Fix /setup environment selection (render Markdown table instead of scraping terminal)#166
Open
amilandi wants to merge 1 commit into
Open
Fix /setup environment selection (render Markdown table instead of scraping terminal)#166amilandi wants to merge 1 commit into
amilandi wants to merge 1 commit into
Conversation
…scraping the terminal The onboarding flow asked Copilot Chat to read discover.py's plain-text terminal table and rebuild every row into a vscode_askQuestions picker. Copilot Chat truncates terminal scrollback and never surfaces that table to the user, so the picker came up empty or truncated and selection often failed. Now discover.py --list-environments also writes a complete, numbered Markdown table to workspace/onboarding/environments.md (printed as ENV_TABLE_MARKDOWN:<path>). step1.md reads that file, shows the full table to the user verbatim, and asks them to type the row number, then runs --select N. No terminal scraping, no picker reconstruction; scales to any number of environments. - list_environments.py: add write_environment_markdown() (pipe-escaped, placeholder for no-Dataverse rows). - discover.py: write the Markdown file + emit ENV_TABLE_MARKDOWN marker on the list (non-select) path. - step1.md: render the table from the file; number-entry selection with invalid-number retry. - tests: cover the Markdown writer (numbering, placeholder, pipe escaping). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
👋 Friendly reminder: This PR has been inactive for a while. Could the author or reviewers take a look and either push it forward, request changes, or close it if it's no longer needed? Let's keep our PR queue healthy! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
/setupand choosing "Yes, list my environments" frequently shows no environment table (or a truncated one), and Copilot Chat often doesn't know how to proceed.Root cause:
step1.mdrandiscover.py --list-environments(which prints a plain-text ASCII table to the terminal) and then asked the model to read that terminal output, parse every row, and rebuild each environment into avscode_askQuestionspicker. Copilot Chat truncates terminal scrollback and never surfaces the ASCII table to the user, so the reconstruction lost rows or failed entirely.Fix
Stop relying on the model scraping the terminal.
discover.py --list-environmentsnow also writes a complete, numbered Markdown table toworkspace/onboarding/environments.mdand prints anENV_TABLE_MARKDOWN:<path>marker.step1.mdreads that file, shows the full table to the user verbatim, asks them to type the row number, then runs--select N.Benefits: no terminal scraping, no picker reconstruction, the user always sees the full table, and it scales to any number of environments.
Changes
list_environments.py: newwrite_environment_markdown()(pipe-escaped names,(no Dataverse linked)placeholder).discover.py: write the Markdown file and emit theENV_TABLE_MARKDOWN:marker on the list (non-select) path.src/skills/onboarding/step1.md: §1.1/§1.1a/§1.1b now render the table from the file and use number-entry selection with an invalid-number retry.tests/scripts/test_discover.py: cover the Markdown writer (numbering, placeholder, pipe escaping).Validation
tests/scripts/test_discover.pypass (16).test_installer_maker_profile.pyare unrelated (they also fail onmain).