Skip to content

fix(hub-ui): select a visible dock on standalone startup - #377

Merged
antfu merged 1 commit into
devframes:mainfrom
dvcolomban:dvcol/standalone-visible-default
Sep 9, 2026
Merged

fix(hub-ui): select a visible dock on standalone startup#377
antfu merged 1 commit into
devframes:mainfrom
dvcolomban:dvcol/standalone-visible-default

Conversation

@dvcolomban

@dvcolomban dvcolomban commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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 main at 5f6d5bee, 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.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
devframe Skipped Skipped Sep 9, 2026 10:53pm UTC

@dvcolomban
dvcolomban force-pushed the dvcol/standalone-visible-default branch from db08151 to bbb228c Compare September 9, 2026 22:43
@dvcolomban
dvcolomban force-pushed the dvcol/standalone-visible-default branch from bbb228c to 7257947 Compare September 9, 2026 22:48
@dvcolomban
dvcolomban force-pushed the dvcol/standalone-visible-default branch from 7257947 to 901cf45 Compare September 9, 2026 22:53
@dvcolomban
dvcolomban marked this pull request as ready for review September 9, 2026 22:56
Copilot AI lite review requested due to automatic review settings September 9, 2026 22:56
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 9, 2026

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~1 changed · 🔴 -0 removed · 1 flow · 1 file · commit 901cf45


Architecture

Architecture diagram for devframes/devframe at 901cf45

1 component touched across 3 lanes.

Open the interactive canvas


Data flow

Data flow diagram for devframes/devframe at 901cf45

Initial dock entry activation

Open the interactive canvas


Drill down
Client Runtimes & UI — 1 component
🟡 CHANGED Dock UI & Web Component

Renders the standalone dock interface, handles entry navigation, and manages RPC authorization.


View

  • Architecture lens
  • Data flow lens
  • Expand every detail
  • Show unchanged neighbours

Tip

PR Lens is free for open source. A star on the repository is what keeps it going.

🪧 More tips
  • Run PR Lens on your own machine: npx skills add coldteadotai/pr-lens installs the agent skill. Then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Draw a diff before it is even a pull request: npx @coldtea/pr-lens-cli analyze --base origin/main reads the diff with your own model key, and npx @coldtea/pr-lens-cli render .pr-lens/graph.json draws the same lenses on your machine.
  • The boxes under View are live. Tick Architecture lens or Data flow lens to choose which diagrams appear, or Expand every detail to open every drill-down at once. The comment redraws in place a few seconds later.
  • Show unchanged neighbours lists the components this change did not touch alongside the ones it did, so the drill-down shows what the changed code sits next to.
  • GitHub will not let you zoom an image in a comment. The link under each diagram opens it on an interactive canvas, where you can zoom, pan and step through the flow.
  • The CLI's render picks up .github/pr-lens.yml automatically and applies your corrections (renames, exclusions, lane pins) at draw time.
  • Would you rather run it from CI on a key of your own? Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and a model key in your repository secrets, say GEMINI_API_KEY. The Action asks Gemini by default, or OpenAI and any endpoint speaking /chat/completions through its provider input.
  • Push a new commit and the whole comment re-renders for the new head. An older run never overwrites a newer one, so a slow render cannot put a stale diagram back.
  • The diagrams follow your GitHub theme, so dark mode gets the dark render and light mode the light one, and the moving dots show this pull request's data in motion.

◈ Rendered by PR Lens · crafted with ❤️ by the Coldtea team · Come say hi on Discord

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 raw entries[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 action or ~builtin entries.
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.

Comment on lines +35 to 42
([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)
},
@antfu
antfu merged commit c307c30 into devframes:main Sep 9, 2026
14 checks passed
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.

3 participants