Skip to content

fix(crew-window): frame each notice once and keep the scrollbar clear - #33735

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
crew/mate/crew-window-notice-frames
Nov 9, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
crew/mate/crew-window-notice-frames

Conversation

@cixuuz

@cixuuz cixuuz commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: In the crew chat window, every notice above the composer has exactly one frame, the glass chip behind the frameless notices can no longer disagree with what it shows, and the composer dock leaves the transcript's scrollbar uncovered.

Three defects #23930 left in website/src/pages/chat/crew-window/CrewChatWindow.tsx (issue #33698):

  • An error card (crew unreachable, action refused, pick refused) sat inside the notices column's glass chip, so one sentence had two frames.
  • The chip mounted on hasNotice, a hand-kept copy of every notice's render condition. Two of the notices it gated, the offline line and the effort-options failure, had no test, so dropping either clause stayed green.
  • The dock spanned the scroller's scrollbar column, and the composer's shelf fade, which spans the dock's box, painted the page colour over the bottom of the thumb.

Why it matters

Everyone who chats with a connected crew sees the doubled frame on every failed send or refused pick, the moment the window most needs to read clearly. A notice added to the chip later could silently never show. Where scrollbars are classic (Windows, Linux), the bottom of the transcript's scrollbar hides behind the composer, which is where the thumb sits whenever the conversation is at its end.

Not a goal

What changed (motivation → approach → change)

The crew window's notices column and dock now follow the local dock's own rules instead of a copy of them.

Before After
Every notice on one glass chip, so a card's border sat inside the chip's frame A card notice stands alone in the column, as the local dock's refused-press notice does; the chip holds only the frameless lines: inline read failures, the offline readout, the rewind prompt
The chip mounted on hasNotice, a hand-kept copy of nine render conditions One list of [condition, line] pairs (noticeLines) both mounts the chip and fills it
The dock measured its own height with a local ResizeObserver and spanned the scrollbar column The dock takes useComposerDockMetrics(scrollerRef), the local hosts' measurement, and stops short of the gutter with right: dockGutter

website/docs/page-layout.md and the header of website/src/pages/chat/composerDockMetrics.ts name the crew window as the third host of the floating dock.

Backwards compatibility

Compatible: a layout change inside the crew window only; every notice still shows on the same condition, in the same column and the same order.

Removes nothing: the card notices move out of the chip, not out of the column, and hasNotice and the local ResizeObserver were private to the component.

Tests

website/src/test/CrewChatWindow.test.tsx:

  • keeps a card notice off the glass chip that holds the frameless lines: a refused rewind shows the refused card in the column on no glass, and the rewind line on the chip. Red on the parent, where the card sat inside the chip.
  • stops the dock short of the transcript's scrollbar gutter: with the scroller reporting a 6px gutter, the dock root's right is 6px. Red on the parent.
  • shows the offline line on the notices chip while the crew is not connected and shows a failed effort-options read on the notices chip: the two notices that had no test. Each goes red when its entry is dropped from noticeLines.
  • floats the composer in the local dock shape, with an empty notices column that takes no room: checks that no box from the composer's own root up to the dock root draws glass, a top border or vertical padding, in place of an exact class-string match that a harmless reorder broke and a band inside the second wrapper passed.

Proof: not provable -- frontend test (prove.py runs Python only)

Determinism: the five tests green 20 of 20 runs on their own; the whole file green 10 of 10 runs beside CrewWindowGuard.test.tsx and composerHost.crewWindowTranscript.test.tsx; the whole file green in 3 of 3 shuffled orders (--sequence.shuffle, seeds 13128, 28809 and 26017).

Manual verification

The frames below come from a Playwright harness against the built SPA with every /api route answered from fixtures: "before" from main's component, "after" from this branch. The harness also measured each scene. Before, the card sat on a glass pane and the dock's right edge met the scroller's over a 6px gutter; after, no card sits on glass and the dock stops 6px short of the scroller's edge.

Screenshots / video

A refused rewind, after: the refused card is its own one frame, and the rewind line keeps the chip.

after: refused card on its own, rewind line on the chip

The same scene before: the card's border inside the chip's frame, with the rewind line on the same chip.

before: refused card inside the chip with the rewind line

The bottom-right corner at the end of a long transcript, thumb shown as while scrolling. Before, the shelf fade under the composer hides the bottom of the thumb; after, the thumb reaches the bottom edge.

before: thumb cut off under the fade after: thumb reaches the bottom

More frames

An unreachable send, after: one card and no chip.

after: unreachable card on its own

The window while its version read is out: the offline readout on the chip, unchanged by this PR.

after: offline readout on the chip

Related Issues

Closes #33698

Follows #23930. Open #32016 edits the rewind line's Cancel button in CrewChatWindow.tsx, the block this PR moves into noticeLines, so whichever lands second rebases that one block.

Sibling sweep

Swept: git grep -n "<Glass" -- 'website/src/*.tsx', then every pane checked for a card (non-inline) ErrorNotice inside it
Sibling: website/src/components/milestones/MilestonesSheet.tsx:244 -- not affected -- its notice is the inline variant, which draws no frame
Sibling: website/src/components/notifications/NotificationBanner.tsx:509 -- not affected -- its notice is the inline variant, which draws no frame
Swept: git grep -n "paddingBottom: dockH" -- website/src
Sibling: website/src/components/ChatPane.tsx:735 -- not affected -- already takes useComposerDockMetrics with right: dockGutter
Sibling: website/src/pages/chat/page/messageActions.ts:43 -- not affected -- the main chat's dock, already on the shared hook

Pattern harvest

Not generalizable: all three defects came from one host's hand-made copy of the local dock (a chip around every notice, a hand-kept mount condition, its own measurement), and the sweep found no other host carrying any of them.

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

@cixuuz
cixuuz requested review from a team and KiroCrewCaptain as code owners November 9, 2026 06:00
@cixuuz
cixuuz requested a review from tim-finnigan November 9, 2026 06:00
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 90a8460094a09df19ec488f28923631548534b29 — 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 does not.

First-Principles-Verdict: PASS

Nothing blocks: each item maps to a defect in #33698, and the measurement uses the existing shared hook instead of a new copy.

What this change ships

Inventory (6 items) — 6 justified

Intent: in the crew chat window, each notice has one frame and the composer leaves the scrollbar visible. This is a FIX.

  1. Error cards (unreachable, refused action, refused pick) now stand alone in the notices column instead of sitting inside the glass chip — justified
  2. The glass chip now opens only when one of its own frameless lines shows, read from one list instead of a hand-kept copy of the conditions — justified
  3. The composer dock now stops short of the transcript's scrollbar, so the shelf fade no longer covers the bottom of the thumb — justified
  4. The dock's height now comes from the shared useComposerDockMetrics hook instead of a local ResizeObserver — justified
  5. The dock-shape test now walks every box from the composer up to the dock instead of matching exact class strings, and adds tests for the offline line and the effort-options failure — justified
  6. page-layout.md and the composerDockMetrics.ts header now name the crew window as the third dock host — justified

[FIRST-PRINCIPLES-REVIEWED] 90a8460

Description read

[DESCRIPTION-READ] bd226c31b3491a624e75453eac29d24eb6b104e205ad6f1de7db6c2e69404bbd

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 added the readiness: action required A blocking check or review needs attention label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 90a8460

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 90a8460094a09df19ec488f28923631548534b29 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 90a8460094a09df19ec488f28923631548534b29 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The change only moves notices and the dock, with no new controls or copy, and all six screenshots cover the before and after states.

Notes

  • The refused card shows raw backend text, "slot is running", under its sentence. The blind reader said "no idea what 'slot is running' means". This was already there before this PR; a follow-up could map it to user-facing wording.
  • In shots 5 and 6 the sidebar says "astro Online" while the notices say "Couldn't reach astro" and "astro is not connected". The reader said "I wouldn't trust either one." This is also pre-existing and worth an issue.

[UX-REVIEWED] 90a8460

Description read

[DESCRIPTION-READ] 1bfe4cf9bb684bf1a1f3becd4a94b1c8c129cbfe5d28da881ef5858ebd709c90

That sha256 names everything this verdict read: the PR description, plus the 9 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 Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 90a8460

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 90a8460094a09df19ec488f28923631548534b29 false-positive: <reason, 20 to 500 characters>

The crew window's notices column put every notice on one glass chip, so
an error card drew a second frame around its own, and the chip's mount
condition was a hand-kept copy of each notice's render condition. Card
notices now stand alone, as the local dock's refused-press notice does,
and one list of condition and line pairs both mounts and fills the chip
that the frameless lines share.

The dock takes the shared useComposerDockMetrics measurement in place of
its own ResizeObserver, so it stops short of the transcript's scrollbar
gutter and the composer's shelf fade no longer paints over the thumb.

Closes #33698
@cixuuz

cixuuz commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in test/test_chat_resume_all.py since this head's CI ran (359e4ef -> aa08664); CI re-running on 90a8460. The patch is unchanged. The previous round's red checks came from GitHub 504s during runner setup: Design Review and Flake Pattern Ratchet never ran their review or ratchet step, and Await Fast Gate and Coverage Gate failed closed behind them.

@cixuuz
cixuuz force-pushed the crew/mate/crew-window-notice-frames branch from bd73ac3 to 90a8460 Compare November 9, 2026 06:37
@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 Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 90a8460094a09df19ec488f28923631548534b29 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the notices chip now mounts from the same list that fills it, and the dock uses the measurement the other two hosts already share.

[DESIGN-REVIEWED] 90a8460

Description read

[DESCRIPTION-READ] abb5879e8edf2180380d489b3680fb2b67ab6e55af3c5ffeefbbb20c66a83fe8

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 added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 9, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 9, 2026 08:00

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed on head 90a8460. Every card notice (unreachable, action refused, picker refused, mode refused) still renders in the same column, on the same condition and in the same order. The glass chip now mounts only for the five frameless lines, from the same noticeLines list that fills it. The dock gutter now comes from the shared useComposerDockMetrics hook with right: dockGutter, which is the same shape the two local hosts use. We traced each new test against the production change: the card off chip test and the 6px gutter test fail on the parent, and the offline line and effort options tests fail if their entry is dropped. Nothing touches a security, auth or backend surface.

Done well: one list both mounts and fills the chip, so the old hand kept hasNotice copy can no longer drift. The local ResizeObserver is gone and the window reuses the hook that already exists.

  • Optional: in the dock shape test, add expect(dock.children[1]).toHaveClass('relative', 'z-10', 'dock-inert') so the stacking context that draws the .glass-shelf::before fade stays pinned.
  • Optional: in the unreachable send test, assert that the notices column has no .liquid-glass when only the card shows.
  • Optional: reword the "No hand-off" comment in noticeLines so it plainly covers all three read failure entries.

@KiroCrewCaptain
KiroCrewCaptain merged commit 5a9b9b3 into main Nov 9, 2026
98 of 99 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the crew/mate/crew-window-notice-frames branch November 9, 2026 08:00
bolichen97 pushed a commit that referenced this pull request Nov 9, 2026
…#33735)

The crew window's notices column put every notice on one glass chip, so
an error card drew a second frame around its own, and the chip's mount
condition was a hand-kept copy of each notice's render condition. Card
notices now stand alone, as the local dock's refused-press notice does,
and one list of condition and line pairs both mounts and fills the chip
that the frameless lines share.

The dock takes the shared useComposerDockMetrics measurement in place of
its own ResizeObserver, so it stops short of the transcript's scrollbar
gutter and the composer's shelf fade no longer paints over the thumb.

Closes #33698

(cherry picked from commit 5a9b9b3)
bolichen97 pushed a commit that referenced this pull request Nov 9, 2026
…#33735)

The crew window's notices column put every notice on one glass chip, so
an error card drew a second frame around its own, and the chip's mount
condition was a hand-kept copy of each notice's render condition. Card
notices now stand alone, as the local dock's refused-press notice does,
and one list of condition and line pairs both mounts and fills the chip
that the frameless lines share.

The dock takes the shared useComposerDockMetrics measurement in place of
its own ResizeObserver, so it stops short of the transcript's scrollbar
gutter and the composer's shelf fade no longer paints over the thumb.

Closes #33698

(cherry picked from commit 5a9b9b3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crew window: error cards get two frames, and the dock covers the transcript scrollbar

2 participants