Repository navigation
Conversation
tobocop2
force-pushed
the
feat/analyze-tui
branch
from
September 27, 2026 23:51
6eb392f to
63c44b5
Compare
tobocop2
force-pushed
the
feat/analyze-tui
branch
from
September 28, 2026 00:42
63c44b5 to
8da7753
Compare
/analyze [dir] runs analyze as a task-bar task with progress and cancel, then opens a report screen: what analyze found, the files it could not read, the recommended profile with its changes and their reindex cost, and the notes. Apply opens the existing Apply dialog on the recommended profile; Save only writes it without switching. "Analyze documents" in the command palette runs it on the indexed documents. The /add argument hint shows the analyze tip while the command is typed, before anything is added, and only while the project is on Default, never analyzed and has not hidden the tip. /analyze off hides it.
When analyze finished, the report opened over the chat with focus on its Apply pill, and the Apply dialog also started on Apply. Two Enters meant for the chat switched the profile and queued a full rebuild; a typed "s" saved a profile. The finished run now only shows a notice. /analyze report opens the last report when the user asks for it. The report opens with focus on its read-only text, has no single-letter bindings, and the Apply dialog starts on Cancel, so no key acts until the user moves to a pill. The analyze tip now also needs a project with no documents: nothing in the documents folder and no added source. The CLI tip on init and add and the TUI /add hint follow the same rule. Analyze gets its own task pill colour.
test_tui_analyze.py copies _press()/_until() from test_tui_profile_tab.py and hit the same Windows flake: a loaded runner exhausted _PAUSES=300 waiting for a ConfirmPill to take focus. Raise the budget to 900 to match the profile-tab fix.
The save-then-discard test pressed enter/space/a/s/enter, then checked the report screen was still on top after one unconditional pilot pause. Wait on the screen with _until() instead, the same flaky shape a loaded Windows runner exposed in _press() (#958).
test_tui_analyze.py's _press() copied the same single-shot focus-then-wait shape as test_tui_profile_tab.py, so it carried the same race: Widget.focus() only queues a call_later, and had no way to recover if the dialog's own on_mount or a worker callback touched focus in the same window. Delegate to the shared press_widget() in tests/_async_wait.py, which calls Screen.set_focus() directly instead (the synchronous primitive focus() defers to) and retries it while the widget is not yet focusable, and drop the pause budget back to 300 now that the wait no longer needs a wider margin to cover a one-shot bet.
tobocop2
force-pushed
the
feat/analyze-tui
branch
from
September 28, 2026 06:27
8da7753 to
da8e7cc
Compare
Owner
Author
|
This change is now part of #1003, which collects every Profiles pull request on one branch. Review and merge happen there. The branch stays in place. |
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
lilbee analyzeexisted on the command line and over HTTP, but the TUI could not run it, and nothing told a new user it existed before they added files.Solution
/analyze [dir]runs the analysis in the background with progress and shows a notice when it finishes;/analyze reportopens the report. It never opens on its own, so keys typed into chat cannot act on it. The report screen shows what it found, any files it could not read, and the recommended profile with each change it makes, marked as needing a reindex or applying to new files only. Apply opens the Apply dialog on the recommended profile, which starts on Cancel; Save only saves it without switching, and Close leaves everything as it is./analyze offstops the tip.The
/addhint shows a short tip to run/analyzefirst, before anything is added, while the project is on Default, has never been analyzed, has no documents and nothing queued for indexing, and the tip has not been turned off.Everything works by keyboard in an 80 by 24 terminal; the changes table scrolls.
Notes
This stacks on #964.