Repository navigation
Tasks dock tabs: keep the 13.5px size while the tab strip fits; shrink only when it would not - #9683
Merged
Merged
Conversation
…sh… [ORB-25032] Tasks dock tabs: keep the 13.5px size while the tab strip fits; shrink only when it would not Fixes: f5a8f33 ("refactor: Dashboard: move Residents from Automation into a tab of the T… [ORB-24810] (#9608)") Regression-From: ORB-24810 Regression: broke_existing; escape=spec_ambiguous; severity=low
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
ORB-25032 — Tasks dock tabs: keep the 13.5px size while the tab strip fits; shrink only when it would not
Description
Daniel's correction (session f09993e5): "these got smaller than before. can you revert it back to its original size. make them smaller only when there is no more space. and update ux rule"
What's wrong: the Tasks dock tab strip (Drain, Notices, Residents, Log) now renders at 12px at the dock's normal width. Before, it rendered at 13.5px.
Cause: ORB-24810 (#9608) added
@container (max-width: 440px) { .dock-seg { font-size: 12px; } … }tocrates/orbit-web/assets/dashboard/css/dock.css. The dock's usual width is below 440px, so the query fires even when the full-size tabs fit with room to spare. It also reduces the count badges to 11px, ellipsizes.dock-log-stateand hides.dock-drain-stateat the same widths.Fix: the tabs, badges and states keep their normal size and content wherever the full-size strip fits. They shrink, and then drop secondary state, only at widths where the full-size strip would otherwise overflow. That includes the case where the Fleet tab and count badges appear. The trigger may be measured (for example a ResizeObserver comparing the strip's scroll width with its client width) or a breakpoint derived from the strip's real full-size width. A fixed width that also catches fitting layouts is the defect.
The governing rule is STD-07 R39 as of v7: members keep their full size wherever the row fits, and shrink only where it would not. The umbrella standard is updated separately.
Acceptance Criteria
Screenshots
Execution Summary
Click to expand
Fix: removed the fixed @container (max-width: 440px) shrink in crates/orbit-web/assets/dashboard/css/dock.css (it fired at the dock normal 320-440px width even when the full-size strip fits) and replaced it with measured stages: log-tail.js fitDockTabs() removes dock-tabs-compact/dock-tabs-tight, measures visible tabs natural width (scrollWidth sum + gaps) against the strip width, adds compact (12px labels, 11px badges) only on overflow, then tight (6px gap, hidden .dock-drain-state, ellipsized .dock-log-state, clipped tabs) only if still overflowing. ResizeObserver on .dock-head, MutationObserver on #dock-mode-toggle (badge/state text, Fleet add/remove, hidden), document.fonts.ready, and applyDockMode() all refit, so widening restores 13.5px without reload. Criteria: (1) PASS headless Chromium harness with real dock.css + extracted real fitDockTabs at 400px, Drain/Notices(3 open)/Residents(2)/Log usual states: font=13.5px, class=full, overflowPx=0. (2) PASS 400px+Fleet+2 errors: compact only, drain state still visible, overflow 0; 300/320px+Fleet+Winding down+12 errors: tight, drain=none, overflow 0, one line. (3) PASS same harness shrank case a at 250px (tight) then widened to 400px: classes removed, back to full 13.5px without reload. Validation: node --check log-tail.js PASS; make ci-guards PASS; git diff --check PASS. task.final_validation_commands: not_run (pipeline final validation). Screenshot: screenshots/dock-tabs-dark-900.png (dark only; dashboard supports dark only; harness view at 900px window showing 400/300/320px docks). No UI tests added per workspace guide. STD-07 standard files untouched (umbrella updated separately, per task).
Validation
Branch Freshness
refs/remotes/origin/agent-mainorbit/ORB-25032-193c084d