Skip to content

Improve AI sidebar navigation and make CLI discovery asynchronous - #3294

Merged
abose merged 7 commits into
mainfrom
ai
Oct 25, 2026
Merged

abose merged 7 commits into
mainfrom
ai

Conversation

@abose

@abose abose commented Oct 25, 2026

Copy link
Copy Markdown
Member

CLI discovery could block the shared Node event loop, and opening AI waited for optional checks before showing its controls. This PR makes executable discovery asynchronous and pins the companion Pro changes that defer discovery and render the AI panel before checks finish. It also fixes History navigation feedback and the white scrollbar hover strip in the dark AI sidebar on Windows.

Companion PR: https://github.com/phcode-dev/phoenix-pro/pull/296. The Pro pin matches that PR's head revision.

What kind of change does this PR introduce?

Bug fixes, performance refactoring, dependency update and benchmark documentation.

  • Replace blocking PATH lookups and related filesystem probes with bounded asynchronous operations. Preserve bundled/override precedence, share concurrent requests, and recheck removed executable paths.
  • Await downloader discovery at the Node RPC boundary so setup receives the resolved tool name.
  • Keep AI sidebar scrollbar tracks transparent and thumbs dark on Windows light-theme hover, matching Layers.
  • Show History as the header title, select its button, keep Back available, and hide model/mode selectors while History is visible.
  • Add the localized readiness notification and pin Pro to ea7586a88ea44402d9425fd4af539c507360af76.
  • Keep LMDB runtime behavior unchanged; add the benchmark-based rationale beside its synchronous validation call.

Does this PR introduce a breaking change?

No.

Tests done

  • Registered CLI Locator unit suite: 21/21 on Linux and macOS; 19/19 on Windows. The two additional cases use POSIX-only fixtures.
  • Companion Pro first-use integration checks: 10/10 on each native platform; Ask AI Send: 13/13 on each; History navigation: 9/9 on native Linux.
  • Full Pro CLI suite: 66/66 Windows, 64/66 macOS, 65/67 Linux. The two failures on each of macOS and Linux are existing demo-link focus assertions in unfocused runners; no tests disabled.
  • Reproduced and verified the scrollbar fix with real mouse hover in Windows; checked macOS light/dark styles and Linux consistency. Manually checked History in Linux and pending-readiness behavior on all three platforms.
  • Core lint, targeted Pro lint, LESS compilation and whitespace checks pass. Existing storage integration checks pass 11/11 on each platform after reverting the LMDB experiment.

Performance and scope

The paired startup measurements show zero CLI/downloader probes while AI is unused. First-use panel rendering improved in all 15 measured warm-debug pairs, but app-ready and Node-ready results remain mixed. These checks do not establish a universal startup speedup or cold-start performance on slower Windows machines. Bundled-version metadata, broader authentication changes, cache refinements and further profiling remain deferred.

The companion benchmark record and limitations retain the raw measurements, rejected async-LMDB experiment and unchanged synchronous baseline.

Suggested changelog

AI cards appear sooner on first use and preserve drafts while setup checks run. Back closes History without leaving the current conversation, and AI sidebar scrollbars retain their dark appearance when hovered in Windows light theme.

abose added 7 commits October 25, 2026 11:03
Give the AI chat, Home and history scrollers the same scoped styling as
Layers: a transparent track and a subtle rounded thumb. The Windows
light-theme scrollbar hover rule previously painted a white strip inside
the always-dark AI sidebar. Keep the override confined to these sidebar
scrollers so editor and nested tool scrollbars retain their own styles.

Reproduced and verified with real mouse hover in the Windows debug app.
Checked native macOS light/dark computed styles and matching scrollbar
styling in Linux. LESS compilation and whitespace checks pass.
No test suites were added or run for this CSS-only change.
Show Back whenever AI History is open, including when opened from Home.
Highlight the active History button with the existing AI accent and keep
header actions visible while History is open.

Show the History heading in place of the mode selector and hide the chat
model selector. Closing History restores the original heading and model
control and clears the selected button state.

Verified manually in the connected Linux app and with all nine cases in
the Pro AI Chat History Navigation integration suite. LESS compilation,
ESLint, and whitespace checks pass. Leave Pro pins unchanged while further
changes are pending, as requested.
Keep the original storage implementation and record the rejected async
experiment beside execFileSync. App-ready was slower in 7/10 Windows,
6/10 Linux and 8/15 Mac matched warm-reload pairs despite better Node
responsiveness. Link the preserved benchmark baseline and raw results.

All experimental runtime and test changes were reverted. Existing storage
integration tests pass 11/11 on Windows, Mac and Linux after restoration.
Replace blocking where/which commands and filesystem probes with bounded
execFile lookups and asynchronous access/nvm metadata reads. Check trusted
native install paths before starting PATH discovery, retain candidate and
override precedence, and share in-flight work by CLI plus override.

Await downloader detection at the Node RPC boundary so setup receives the
resolved tool name. Keep the synchronous LMDB integrity check unchanged.

Extend the registered Jasmine CLI Locator suite for parent responsiveness
while a real child waits, lookup fallback/deadlines, native-first discovery,
and concurrent overrides. Native runs pass 21/21 on Linux and macOS and
19/19 on Windows; the two additional POSIX fixtures do not run on Windows.

The companion Phoenix Pro change defers discovery until first AI use and
records the full cross-platform startup benchmark and its limitations.
Add the translated-string key for the wait notification shown when a user
clicks or sends before initial AI availability checks finish.

Advance the Phoenix Pro pin from f0dcc766 to f33d786, including history
navigation fixes, deferred CLI discovery and immediate panel rendering.
The pinned revision preserves drafts while checks run and updates setup
state in place; it also retains the startup benchmark records and limits.

Validation: Pro first-use integration checks 10/10 and Ask AI Send 13/13
on Windows, Mac and Linux. Full CLI suite passes 66/66 on Windows; Mac
and Linux retain two existing demo-focus failures each. Pin verified
against the local Pro ai branch. No deployment or publication performed.
Advance the Pro pin to ea7586a so the checkout includes the user's latest
decision to defer the four remaining startup optimization items.
The AI first-render fix and its verification records remain included;
this follow-up changes only task documentation and the tracked revision.

Validation: tracking-repos.json matches the local Phoenix Pro ai HEAD.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit b0d9b19 into main Oct 25, 2026
6 of 21 checks passed
@abose
abose deleted the ai branch October 25, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant