Skip to content

fix: match side panel glyphs to the dock position - #14845

Closed
aahung wants to merge 2 commits into
kirodotdev:mainfrom
aahung:fix/side-panel-dock-icon
Closed

aahung wants to merge 2 commits into
kirodotdev:mainfrom
aahung:fix/side-panel-dock-icon

Conversation

@aahung

@aahung aahung commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The side panel's open and close buttons show an icon that matches where the panel is docked.

With Dock panel below chat selected, the close button in the side panel header and the "Open activity panel" button in the chat header both still draw the right-dock glyph (a panel on the right edge). The icon tells the user the panel lives somewhere it does not.

Why it matters

Anyone who docks the panel below the chat sees an icon that points to the wrong place every time they open or close it. It is a small but constant mismatch between the control and the layout it controls.

Not a goal

What changed (motivation → approach → change)

  • Symptom: with the dock set to bottom, every control that opens or closes the side panel shows the right-dock icon.
  • Root cause: each control hardcoded one glyph (PanelRightSolid or PanelRightLight), regardless of the dock setting.
  • Change:
    • New website/src/components/SidePanelGlyph.tsx: useEffectiveSidePanelDock() resolves where the panel actually docks from the stored preference, the mobile check, and a SidePanelDockHost context saying whether the current host can dock bottom. SidePanelGlyph draws the bottom-dock pane or the right-dock pane from that; light selects the open-state variant.
    • Hosts provide the context once: ChatPage passes whether the shell's activity bar hosts the panel (the inline panel in embed frames, popouts and mobile always opens right), MembersPage passes false, and SidePanel passes its own canDockBottom. So a chip or card inside a right-only host never shows the bottom glyph.
    • All seven sites that open or close this panel now use it:
      • pages/chat/SidePanel.tsx: the panel header's close button.
      • pages/ChatPage.tsx: the chat header's "Open activity panel" button.
      • pages/chat/ToolCallLine.tsx: the "open in side panel" link.
      • pages/chat/SubagentRunCard.tsx and pages/chat/SubagentCompletionCard.tsx: the subagent cards' panel buttons.
      • pages/chat/WorkflowRunCard.tsx and pages/chat/WorkflowCompletionCard.tsx: the workflow cards' panel buttons.
    • components/icons/panels.tsx: exports PanelIconProps so the wrapper can forward icon props.

The phone overflow menu's "Open activity panel" item in ChatPage.tsx keeps PanelRightSolid. It only renders on mobile, where the panel always docks right.

Backwards compatibility

Compatible: only the icon each control draws changes. Behavior, labels and settings are unchanged, and the right-dock rendering is identical.

Tests

New website/src/test/SidePanelGlyph.test.tsx covers the right dock, a live flip to the bottom dock, the light variant for each dock, the mobile override, and hosts that can and cannot dock bottom. tsc --noEmit and eslint on the touched files are clean. vitest run on the SidePanelGlyph, SidePanel, ChatPage, MembersPage, ToolCallLine and subagent/workflow card suites passes (108 files, 1233 tests). One unrelated suite, serveDist.routes.test.ts, could not spawn its probe inside the local sandbox. npm run build succeeds.

Manual verification

The built dashboard was exercised in headless Chromium with fixture-backed API responses (screenshots below). All seven controls were checked in each dock. The real app, and a mobile-width window, were not checked by hand.

Screenshots / video

Captured from the built dashboard in headless Chromium with fixture-backed API responses. The control under test is outlined in orange.

Panel docked below the chat

Before (main) After (this PR)
Close button (panel header)
Open activity panel (chat header)

Subagent completion card's Panel button (after), right dock then bottom dock

Other panel controls (after), right dock → bottom dock

Control Right dock Bottom dock
Tool-call "open in side panel" chip
Subagent run card
Workflow run card
Workflow completion card "Panel" button

Panel docked right (unchanged)

Close button Open activity panel

Full frame, docked below, after:

Related Issues

N/A — reported directly; no issue filed.

Pattern harvest

Rule candidate: a control that opens or closes the side panel renders SidePanelGlyph instead of a fixed PanelRight* icon, so the glyph always matches where the panel docks. The first review round found five such sites the original two-button fix had missed.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

@aahung
aahung requested a review from a team September 28, 2026 22:32
@aahung
aahung requested a review from a team as a code owner September 28, 2026 22:32
@aahung
aahung requested a review from kyleseaman September 28, 2026 22:32
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 1c78625432555dfd391fe0f255ea24cafea3e2f9 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 1c78625

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of 1c78625432555dfd391fe0f255ea24cafea3e2f9 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

No first-time reader has judged the dock-aware glyphs; whether the 12–15 px bottom-pane icon reads as "panel below" is unverified.

Watch

  • Every changed control is shown in both docks (attachments 01–17 reconcile 1:1 against the seven diff sites), but comprehension of the swapped glyph is unknowable in this fork lane — the cap is this lane's limitation, not an author gap. A maintainer wanting the blind read can push the branch to this repository.

[UX-REVIEWED] 1c78625

Description read

[DESCRIPTION-READ] 51db2e696d0e9f3804952a4d57e93a359de911f4fe4f592c886df4de74352641

That sha256 names everything this verdict read: the PR description, plus the 20 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 1c78625432555dfd391fe0f255ea24cafea3e2f9 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

SidePanelDockHost defaults to bottom-capable, so verify no SidePanelGlyph ever mounts outside the three wrapped hosts — all seven current sites are inside them.

What this change ships

Inventory (10 items) — 10 justified

Intent: FIX — the side panel's open/close icons should depict where the panel actually docks; today they always draw the right-dock glyph.

  1. Panel header close button glyph follows the dock — justified
  2. Chat header "Open activity panel" glyph follows the dock — justified
  3. Tool-call "open in side panel" chip glyph follows the dock — justified
  4. Subagent run card panel glyph follows the dock — justified
  5. Subagent completion card panel glyph follows the dock — justified
  6. Workflow run card panel glyph follows the dock — justified
  7. Workflow completion card panel glyph follows the dock — justified
  8. New shared SidePanelGlyph component + SidePanelDockHost context other code may call — justified
  9. PanelIconProps type exported from icons/panels.tsx — justified
  10. 18 before/after screenshots committed under temp-screenshots/ — justified

Evidence run: SidePanelGlyph has 7 real consumers (the seven controls above; grepped SidePanelGlyph). Remaining hardcoded PanelRight* sites are not siblings of the defect: MembersPage.tsx:3018 and ChatPage.tsx:7687 sit in hosts that can never dock bottom (canDockBottom: false / mobile-only), and issue-radar/RefSheet.tsx:149 opens the workspace detail column, not this panel. The effective-dock rule (canDockBottom && dock === 'bottom' && !isMobile) matches SidePanel.tsx:614, the panel's own placement logic. Committed screenshots follow the documented fork-contributor exception in .gitignore (git add -f temp-screenshots/<dir>/...). Defect provenance: committed before/after captures reproduce the mismatch.

[FIRST-PRINCIPLES-REVIEWED] 1c78625

Description read

[DESCRIPTION-READ] 291f20b0adf8657be96349385c8daf5c8328a050feb471b6fd7d853062045d3e

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 1c78625432555dfd391fe0f255ea24cafea3e2f9 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Mobile width was never hand-checked; confirm the phone overflow item and inline panel still draw the right glyph on a real narrow window.

Suggestions

  • useEffectiveSidePanelDock re-states the predicate SidePanel.tsx:614 already computes; have SidePanel derive isBottom from the shared hook (provider wrapping the body) so the panel and its glyphs can never drift apart — the exact bug class this PR fixes.

[DESIGN-REVIEWED] 1c78625

Description read

[DESCRIPTION-READ] 94d34a2310b97d82d16c7f1bc942f8faea222187121f93dc05f1bfa18565237f

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed 1c78625432555dfd391fe0f255ea24cafea3e2f9 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 1c78625

@aahung
aahung force-pushed the fix/side-panel-dock-icon branch from f10fa42 to 168b095 Compare September 29, 2026 00:13
@aahung aahung changed the title fix: match side panel toggle icons to the dock position fix: match side panel glyphs to the dock position Sep 29, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 29, 2026
@aahung
aahung marked this pull request as draft September 29, 2026 01:12
@dwu96

dwu96 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@aahung
aahung marked this pull request as ready for review September 29, 2026 01:33
@aahung

aahung commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @dwu96! I've marked it ready for review, so the workflow runs can be approved on the next cycle.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 29, 2026
Every control that opens or closes the side panel drew the right-dock
glyph even when the panel was docked below the chat: the panel header's
close button, the chat header's open button, the tool-call "open in side
panel" link, and the subagent and workflow run/completion cards.

Add SidePanelGlyph, which reads the dock setting and draws the bottom
or right pane to match, and use it at all seven sites so the choice
lives in one place. Mobile keeps the right glyph, since the panel always
opens on the right there.

Includes the review screenshots under temp-screenshots/, committed
because gh --attach is unavailable to a fork PR.
@aahung
aahung force-pushed the fix/side-panel-dock-icon branch from 1243922 to 06d68bd Compare September 29, 2026 01:44
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Security Scope Review (fork) — 🔴 BLOCK (blocking)

Which legitimate operations does 1243922b109a7dbe3e8976cc36dd6e65931fb099 newly refuse? Model proposes, scripts/deny_diff.py decides — updated in place on each push. A script-confirmed regression blocks PR readiness.

no leg reported, and this was not the nothing-to-adjudicate short circuit

No [SCOPE-REVIEWED] marker for this head was produced, so the model's text is withheld: it cannot be shown to describe this revision. See the job logs.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
SidePanelGlyph read only the stored dock preference, but two hosts
always open the panel on the right: the chat page's inline panel
(embed frames, popouts, mobile) and the Members page. With the
preference set to bottom, the tool-call chip and the run/completion
cards there drew the bottom glyph for a panel that opens right.

Add a SidePanelDockHost context. ChatPage provides whether the shell's
activity bar hosts the panel, MembersPage provides false, and SidePanel
provides its own canDockBottom, so every glyph resolves the dock the
way the panel does. The per-call bottom override is removed.

Adds bottom- and right-dock review screenshots of the four remaining
controls.
@aahung
aahung force-pushed the fix/side-panel-dock-icon branch from 06d68bd to 1c78625 Compare September 29, 2026 02:02
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Thank you for this fix, @aahung! 🙏

To get it through the branch-protection and CI checks (which a fork PR cannot fully satisfy), the change has landed as an in-repo replacement PR: #16773. Your work is preserved exactly:

  • Authorship kept in git history — both commits remain authored by you (Sam Liu), with an added Co-authored-by: @aahung trailer, so git blame/log and GitHub both attribute the change to you.
  • Contributor credit — you'll be added to the README Contributors list by the Add Contributor workflow once fix: match side panel glyphs to the dock position #16773 merges (it credits PR authors, commit co-authors, and the reporter of the linked issue — all of which are you).
  • The replacement also fixes a tsc unused-import that CI flagged on the second commit; nothing about the behavior or design changed.

Closing this one in favor of #16773. Thanks again for improving the side-panel glyphs!

@iamwhatever iamwhatever closed this Oct 4, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants