fix(hub-ui): select a visible dock on standalone startup - #377
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
db08151 to
bbb228c
Compare
bbb228c to
7257947
Compare
7257947 to
901cf45
Compare
◈ PR Lens
Architecture 1 component touched across 3 lanes. Data flow
Drill down
|
There was a problem hiding this comment.
🟡 Changes recommended
The new initial-selection logic can choose a visible entry that fails activation (e.g., a group without members yet) and then does not fall back to the next eligible visible entry, leaving the content blank despite available docks.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes standalone hub UI startup behavior by selecting the initial dock from the visible, ordered dock rail only after the RPC connection is trusted, and by activating that dock via the normal switchEntry() path so routing and client scripts run consistently.
Changes:
- Update standalone startup selection to derive the initial dock from
context.docks.groupedEntries(visible rail ordering) rather than rawentries[0]. - Gate the initial selection on RPC trust and use
switchEntry()to ensure standard activation behavior (client scripts + group routing). - Preserve any existing selection and avoid auto-selecting
actionor~builtinentries.
File summaries
| File | Description |
|---|---|
| packages/hub-ui/src/client/components/dock/DockStandalone.vue | Changes initial standalone dock selection to use trusted, visible grouped entries and activate via switchEntry() for correct startup behavior. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ([groups, trusted]) => { | ||
| if (!trusted || context.docks.selectedId) | ||
| return | ||
| const entry = groups.flatMap(([, entries]) => entries) | ||
| .find(entry => entry.type !== 'action' && entry.type !== '~builtin') | ||
| if (entry) | ||
| void context.docks.switchEntry(entry.id) | ||
| }, |
Background (Why)
Standalone startup selects the first raw dock entry, even when that entry has
when: 'false'.A hidden wrapper registered before its visible tools therefore opens an unintended iframe and leaves the content area blank. Clicking a visible dock works. This reproduces on
mainat5f6d5bee, after #364.Changes (What)
Choose the initial dock from the visible, ordered dock rail once the RPC connection is trusted.
Use normal
switchEntry()activation so client scripts and group routing run.Preserve existing selections, skip actions and built-in fallbacks, and wait when no eligible dock has arrived.