Skip to content

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

Merged
chenmingwei23 merged 2 commits into
mainfrom
replace/14845-side-panel-glyphs
Oct 4, 2026
Merged

chenmingwei23 merged 2 commits into
mainfrom
replace/14845-side-panel-glyphs

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

In-repo replacement for #14845 by @aahung. Original authorship is preserved in the git history (commit author Sam Liu, plus a Co-authored-by: aahung trailer), and @aahung is credited in the README Contributors list. Supersedes #14845.

Problem / Motivation

Goal: The side panel open/close glyphs match where the panel actually docks instead of always showing the right-dock icon.

Every control that opens or closes the chat side panel drew the right-dock glyph even when the panel was docked below the chat — the panel header close button, the chat header open button, the tool-call "open in side panel" link, and the subagent and workflow run/completion cards.

Why it matters

The glyph is the only cue for where a click sends the panel. When it shows "right" for a panel that opens at the bottom, the icon lies about the outcome, so users on a bottom dock cannot trust the control.

Not a goal

  • No change to the panel's docking behavior or the dock preference itself — only the glyph that depicts it.
  • Mobile keeps the right glyph, since the panel always opens on the right there.

What changed (motivation → approach → change)

  • Symptom: all seven panel controls rendered the right-dock glyph regardless of the active dock.
  • Root cause: each call site hard-coded the right glyph; nothing read the dock position.
  • Change: 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. A follow-on commit adds a SidePanelDockHost context so the glyph resolves against the host's actual dock ability: two hosts always open the panel on the right (the chat page's inline panel for embeds/popouts/mobile, and the Members page), and they now provide that fact to the glyph instead of relying on the stored preference alone.

Backwards compatibility

Removes nothing: this is additive UI wiring — a new component and a new context — plus a one-character export on PanelIconProps. No field, kind, validator, route, or public function is renamed, removed, or tightened.

Tests

  • website/src/test/SidePanelGlyph.test.tsx (new, 6 tests): locks in that SidePanelGlyph renders the bottom-pane geometry when the resolved dock is bottom and the right-pane geometry otherwise, and that the SidePanelDockHost context overrides the stored preference.

Manual verification

Captured before/after screenshots of the four remaining controls in both bottom- and right-dock states (committed under temp-screenshots/side-panel-dock-icon/). TypeScript tsc --noEmit and the new vitest file both pass locally.

Screenshots / video

The author committed review screenshots under temp-screenshots/side-panel-dock-icon/ (the gitignored evidence directory, force-added per the template). Representative shots:

Bottom-dock close button (after):

bottom close after

Full before/after set

bottom open after
bottom subagent card
bottom tool row
bottom workflow run card
right subagent card
right tool row
before bottom close
before bottom open

Related Issues

Fixes #16772

Supersedes #14845 (fork PR by @aahung).

Pattern harvest

Not generalizable: this is a single missing state-to-glyph wiring in one UI component family; there is no broader class of defect a rule would catch.

Checklist

  • At most two commits, with a Conventional Commits title (fix: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable) — N/A, no docs affected
  • No secrets, credentials, or internal references in the diff

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.
@iamwhatever
iamwhatever requested a review from a team October 4, 2026 12:40
@iamwhatever
iamwhatever requested a review from a team as a code owner October 4, 2026 12:40
@iamwhatever
iamwhatever requested a review from CrysisDeu October 4, 2026 12:40
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of be3adb1a34de8e7d5349966aa5a4e03b0061b793 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Check that the dock rule in SidePanelGlyph.tsx still matches SidePanel.tsx:770. It's a separate copy, and the glyph will go wrong silently if only one copy changes.

Suggestions

  • Export useEffectiveSidePanelDock and use it for isBottom in SidePanel.tsx:770. Then the panel and every glyph get the dock from one function instead of two copies of canDockBottom && dock === 'bottom' && !isMobile.

[DESIGN-REVIEWED] be3adb1

Description read

[DESCRIPTION-READ] 5bd5a857cc8d0b6ca46515ab1fcf7949bd51061a237a3c26059f72683ea3d613

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 Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🟡 CONCERNS

Premise-level review of be3adb1a34de8e7d5349966aa5a4e03b0061b793 — 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: CONCERNS

The SidePanelDockHost wrap inside SidePanel repeats a value that every one of the 3 render sites already provides from outside, so it can be deleted.

Not justified as shipped

  • Item 6 — duplicate of the page-level SidePanelDockHost: <SidePanelDockHost value={canDockBottom}> in SidePanel.tsx always matches the provider above it. I counted 3 <SidePanel render sites. ChatPage's inline panel passes canDockBottom={false} and only mounts when !activitySlot, where the outer value !!activitySlot is false. The portaled panel uses the default true under an outer true. MembersPage passes canDockBottom: false under an outer false. Separately, useEffectiveSidePanelDock writes out the same rule as SidePanel.tsx:770 (canDockBottom && dock === 'bottom' && !isMobile), so that rule now lives in two places.
    Subtraction: delete the SidePanelDockHost wrap and its import from SidePanel.tsx, and have SidePanel.tsx:770 reuse the glyph's resolver so the rule exists once.
    Clears when: the inner wrap is removed, or a render site is named where the inner value differs from the outer one.

What this change ships

Inventory (8 items) — 7 justified

Intent: the open/close glyphs on the side panel should show where the panel really docks (FIX, #16772).

  1. The chat header's open-panel button shows the bottom glyph when the panel docks at the bottom — justified
  2. The panel header's close button follows the dock — justified
  3. The tool-call "open in side panel" link follows the dock — justified
  4. The subagent and workflow run and completion cards follow the dock — justified
  5. Mobile, embeds, popouts and the Members page keep the right glyph — justified
  6. SidePanel wraps its own children in a dock-host provider — duplicate of the page-level SidePanelDockHost
  7. PanelIconProps is now exported — justified
  8. 17 before/after screenshots committed under temp-screenshots/ — justified

[FIRST-PRINCIPLES-REVIEWED] be3adb1

Description read

[DESCRIPTION-READ] e6863b32ff41c41f0b2190b42c7f7276cde118d0d954a162984d73da0efe0b29

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 Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed be3adb1a34de8e7d5349966aa5a4e03b0061b793 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] be3adb1

Verdict parsed from the review's SHA-scoped output markers for commit be3adb1a34de8e7d5349966aa5a4e03b0061b793.

False positive or not applicable? A repository writer can comment:
/ai-review override fable be3adb1a34de8e7d5349966aa5a4e03b0061b793: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of be3adb1a34de8e7d5349966aa5a4e03b0061b793 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Check one thing before merge: on a bottom-docked panel, the bottom-strip glyph should change to the right-bar glyph live when a phone-width window forces the panel right.

[UX-REVIEWED] be3adb1

Description read

[DESCRIPTION-READ] da0fb8a4e2a70aee7e9084925146699d37aa878fd1b802b8938ac9f1e68b49a1

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.

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.

Co-authored-by: aahung <3804518+aahung@users.noreply.github.com>
@iamwhatever
iamwhatever force-pushed the replace/14845-side-panel-glyphs branch from 070eb43 to be3adb1 Compare October 4, 2026 12:49
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of be3adb1a34de8e7d5349966aa5a4e03b0061b793 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] be3adb1

False positive or not applicable? A repository writer can comment:
/ai-review override gpt be3adb1a34de8e7d5349966aa5a4e03b0061b793: <one-sentence reason>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 4, 2026
@chenmingwei23
chenmingwei23 merged commit 06d198d into main Oct 4, 2026
98 checks passed
@chenmingwei23
chenmingwei23 deleted the replace/14845-side-panel-glyphs branch October 4, 2026 16:34
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 4, 2026
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.

Side panel open/close glyphs always show the right-dock icon, ignoring bottom dock

3 participants