Skip to content

fix(station-chrome): animate header insets only on station toggle - #1838

Merged
FresnelR27 merged 1 commit into
developfrom
fix/station-header-inset-transition
Sep 15, 2026
Merged

FresnelR27 merged 1 commit into
developfrom
fix/station-header-inset-transition

Conversation

@Harry19081

Copy link
Copy Markdown
Member

Problem

Header rows that reserve space for the macOS pinned window chrome (the My Station tab bar, the Agent Station header and both chat header rows) change their padding whenever that chrome moves. a5547913a7 removed CHROME_INSET_TRANSITION_CLASSES from the My Station tab bar and the chat header rows because the padding slid on every tab change (leaving the empty Launchpad hides the pinned group), while the Agent Station header kept animating every change. As a result, opening or closing a station makes those headers jump by the reservation and then glide with the panes, and the two stations behave differently.

The chat published header also carried border logic that could never render: joinWithFollowingRow was forced on when the tab row was collapsed and hideBottomBorder covered the other branch, next to a comment saying the publisher decides. The intended design is no bottom rule.

Solution

  • New useStationToggleInsetTransition() in src/modules/shared/layouts returns the shared inset transition classes for 320 ms after effectiveChatPanelMaximizedAtom flips, that is while My Station or Agent Station opens or closes, and an empty string otherwise. The class is added in the same render as the new inset (state adjusted during render), because CSS takes transition timing from the after-change style. Tab and session changes inside an open station therefore snap.
  • Applied to the My Station tab bar, the Agent Station header (previously always animated) and both chat header rows. MainAppPageHeader keeps its always-on transition because it is not a station header.
  • Chat header: removed the border class, hideBottomBorder and the joinWithFollowingRow override. The chat header was the flag's only writer, so the field is removed from PublishedHeaderSlots, WorkstationTabHeaderSlots, the slot duck-type and the chat publish equality check. The My Station and Agent Station header strips now always draw their bottom rule, which is what they already did since nothing set the flag.

Potential risks

  • Collapsing the app navigation sidebar no longer slides station or chat header insets; it snaps, because only a station opening or closing animates. The Agent Station header used to animate this case too.
  • A station open or close that coincides with a tab change (for example an open-tab shortcut that also shows the station) animates both changes within the 320 ms window.
  • The motion was not watched in the running app. Correct timing depends on the class being present in the same commit as the padding change, which the hook guarantees by construction and the unit tests assert at the class level.
  • No persistence, IPC or public API changes. Rollback is a plain revert.

Verification

  • node_modules/.bin/prettier --check, node_modules/.bin/oxlint -c .oxlintrc.json --max-warnings 0 and node_modules/.bin/eslint --max-warnings 0 --report-unused-disable-directives on the 14 changed files: all pass.
  • node_modules/.bin/tsgo --noEmit --pretty false: exit 0.
  • node_modules/.bin/vitest run --config config/vitest.config.ts over src/modules/shared/layouts, src/engines/ChatPanel/header, src/engines/ChatPanel/ChatPanelHeader.test.ts, src/modules/WorkStation/AppShell, src/modules/WorkStation/shared/SessionReplay, src/modules/WorkStation/shared/TabBar, src/store/workstation, src/modules/MainApp/WorkManagement and src/engines/ChatPanel/panels/ProjectPanelView.test.ts: 106 files, 671 tests passed. The new useStationToggleInsetTransition.test.ts covers rest, tab re-renders, close and open, and a quick reopen; ChatPanelPublishedHeader.test.ts asserts no rule and a transition only when one is passed.
  • node scripts/quality/check-test-placement.mjs: consistent. git diff --check: clean.
  • Committed from a linked worktree with hooks enabled (lint-staged, tsgo gated to staged files). The worktree's .git is a file, so the "Pre-commit hook ran." trailer is not appended.
  • Not run: the full unit suite, check:typed-lint, and the app itself. No screenshots or recording: the change is motion timing plus the removal of a rule that never rendered, and neither was captured in this session.

Header rows that reserve space for the pinned window chrome now slide
their insets only while My Station or Agent Station opens or closes.
Tab and session changes inside a station snap, so header controls no
longer glide on every tab switch. useStationToggleInsetTransition
applies the shared transition for 320 ms after
effectiveChatPanelMaximizedAtom flips, in the same render as the new
inset.

The chat pane header has no bottom rule in any layout: the border
class, hideBottomBorder and the joinWithFollowingRow override are
removed. The chat header was that flag's only writer, so it is dropped
from both header slot types and the station header strips always draw
their rule.
@FresnelR27
FresnelR27 merged commit 224b6a4 into develop Sep 15, 2026
14 checks passed
@Harry19081 Harry19081 added UX Improvements to user experience, workflow smoothness workstation Workstation, editor, source control, LSP, or status bar labels Sep 16, 2026
hbrls pushed a commit to nice-fungal/ORG2 that referenced this pull request Sep 29, 2026
Add the architecture audit of My Station (behaviour defects, findings
by area, suggested PR waves) and the companion UI audit of its 36px
bars and sidebars (21 fix, 8 abstract, 12 keep with reason, 1 watch).

Both reports note what the follow-up PRs apply: org2AI#1838 (inset motion
only on station toggle, no chat header rule) and org2AI#1841 (unreachable
code removal).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UX Improvements to user experience, workflow smoothness workstation Workstation, editor, source control, LSP, or status bar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants