Skip to content

Align top-level tab toolbars and responsive behavior - #229

Merged
CrimsonSoul merged 12 commits into
testfrom
codex/all-tab-toolbar-alignment
Aug 6, 2026
Merged

Align top-level tab toolbars and responsive behavior#229
CrimsonSoul merged 12 commits into
testfrom
codex/all-tab-toolbar-alignment

Conversation

@CrimsonSoul

@CrimsonSoul CrimsonSoul commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • standardize the top-level page header and command-bar structure across Compose, Alerts, On-Call, Status, Problems, and Radar
  • align action hierarchy, button geometry, status metadata, Header Search actions, and responsive toolbar behavior
  • keep compact toolbars on one row while controls fit, with full-width wrapping only at 720px and below
  • refine Alerts action placement and Radar status and source labeling

Root cause

The tabs had accumulated independent header and toolbar layouts, and the shared responsive rule forced every command group into two rows below 1320px even when the controls still fit.

Verification

  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm test: 2514 unit, 79 cache, and 3198 renderer tests passed
  • npm run build
  • npm run test:electron: 41 passed
  • npm audit --audit-level=high --omit=dev: 0 vulnerabilities
  • git diff --check

Summary by CodeRabbit

  • UI Improvements

    • Standardized page headers, toolbars, action grouping, spacing, and responsive layouts across major tabs.
    • Improved mobile stacking and consistent control sizing.
    • Updated action labels to clearer title-case wording, with Alerts history separated from overflow actions.
  • Search Improvements

    • Expanded search results for easier scanning.
    • Added dedicated secondary-action areas and clearer keyboard guidance.
    • Improved clear-button size and focus visibility.
  • Accessibility

    • Enhanced toolbar labeling, keyboard navigation, focus states, and action visibility.
  • Documentation

    • Added design guidance and implementation specifications for tab and search layouts.

@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 19:17
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR standardizes top-level tab headers and command bars across Relay destinations. It adds shared tab-chrome primitives and responsive styles, updates Header Search action rails and labels, and expands renderer, CSS, Electron layout, zoom, and screenshot coverage.

Changes

Tab Chrome and Header Search Alignment

Layer / File(s) Summary
Shared contracts and primitives
docs/DESIGN.md, docs/superpowers/..., src/renderer/src/components/tab-chrome/*, src/renderer/src/styles/tab-chrome.css
Defines and implements shared page headers, toolbars, command groups, sizing, responsive behavior, accessibility, and validation requirements.
Tab destination migrations
src/renderer/src/tabs/*, src/renderer/src/features/knowledge/*, src/renderer/src/components/oncall/oncall.css
Migrates seven destinations to shared tab chrome, preserves existing actions and status metadata, and removes obsolete destination-specific header styles.
Header Search actions
src/renderer/src/components/HeaderSearch.tsx, src/renderer/src/styles/{components.css,modals.css}
Adds concise verbs, separate contact bridge actions, reserved action rails, a wider dropdown, responsive sizing, and focus states.
Validation coverage
src/renderer/src/components/**/__tests__/*, src/renderer/src/tabs/**/__tests__/*, tests/e2e/*
Updates structural and interaction tests and adds CSS, responsive layout, zoom, screenshot, action-order, and overflow contracts.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HeaderSearch
  participant SearchResultRow
  participant ContactBridgeAction
  HeaderSearch->>SearchResultRow: Render concise primary action and action rail
  SearchResultRow->>ContactBridgeAction: Render bridge action for contact results
  HeaderSearch->>SearchResultRow: Update keyboard footer hints
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary changes to top-level tab toolbars and responsive behavior.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/all-tab-toolbar-alignment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 19:20

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 19:20
coderabbitai[bot]
coderabbitai Bot previously requested changes Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (2)
tests/e2e/redesign-screenshots.spec.ts (1)

172-184: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Skip zero-size buttons in the containment check.

toolbar.querySelectorAll('button') returns hidden buttons too. A button hidden with display: none reports a rect of 0,0,0,0. When the active panel does not start at x ≈ 0, rect.left >= panelBounds.left - 1 then fails and the check reports a containment failure that no user can see.

This helper now guards six tabs, so filter out zero-size rects.

♻️ Proposed refactor to ignore non-rendered buttons
         return Array.from(toolbar.querySelectorAll('button')).every((button) => {
           const rect = button.getBoundingClientRect();
+          if (rect.width === 0 && rect.height === 0) return true;
           return rect.left >= panelBounds.left - 1 && rect.right <= panelBounds.right + 1;
         });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/redesign-screenshots.spec.ts` around lines 172 - 184, Update the
containment predicate inside the activePanel polling callback to ignore buttons
whose bounding rectangle has zero width or height before checking panel bounds.
Keep rendered buttons subject to the existing left/right containment checks.
tests/e2e/css-visual-contracts.spec.ts (1)

1094-1114: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Use the real action labels in the toolbar fixture.

Several fixture labels are shorter than the labels the app renders. Examples: Copy All versus Copy All On-Call Info, Export versus Export to CSV, and Refresh versus Refresh cloud status and Refresh Radar now. The test then measures narrower toolbars than production. A real overflow regression at 680px can pass this contract.

Align the fixture labels with the labels asserted in the renderer tests so the overflow checks at lines 1268-1270 and 1373-1376 measure production widths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/e2e/css-visual-contracts.spec.ts` around lines 1094 - 1114, The toolbar
fixture in the tabs array uses shortened action labels, causing inaccurate width
measurements. Replace each fixture label with the exact labels rendered and
asserted by the renderer tests, including the On-Call, Problems, and Radar
actions such as “Copy All On-Call Info,” “Export to CSV,” “Refresh cloud
status,” and “Refresh Radar now,” while preserving the existing tab structure
and overflow checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/DESIGN.md`:
- Around line 375-376: Update the action-order description near History and Save
Image so Save Image remains in the Alerts utility group, consistent with its
definitions elsewhere in the design. Remove its placement in the right-aligned
workflow group and document one consistent ordering of the utility and workflow
actions.
- Around line 300-305: Update the Header Search behavior description around
“Search results preserve context” to limit the no-Compose-change guarantee to
contact, server, document, workspace, and tab results. Explicitly document that
group rows use “Add group” as the primary action and change Compose, while
preserving the existing row and footer guidance.

In `@src/renderer/src/components/HeaderSearch.tsx`:
- Around line 674-680: Update handleKeyDown to handle Tab when
dropdownResults[activeIndex] is a contact: prevent the default focus behavior
and invoke handleSecondarySelect. Also restrict hasContactSecondaryAction so the
“Bridge contact” hint is rendered only when the active result is a contact.

In `@src/renderer/src/styles/tab-chrome.css`:
- Around line 79-83: Update the .tab-command-group--workflow rule by adding an
empty line before the margin-left declaration to satisfy Stylelint’s
declaration-empty-line-before requirement.
- Around line 58-147: Update .tab-command-bar and .tab-command-group to use
flex-wrap: nowrap by default, then override both to flex-wrap: wrap inside the
existing max-width: 720px media query so toolbar controls remain on one row
above the breakpoint.

In `@tests/e2e/css-visual-contracts.spec.ts`:
- Around line 1274-1275: Update the geometry assertions near the utilityHeights
and workflowHeights checks to first assert each measured array’s length matches
its corresponding declared action count, including tabs with zero workflow
actions, then retain the existing uniform-height assertions so empty arrays
cannot pass without validating the expected counts.

---

Nitpick comments:
In `@tests/e2e/css-visual-contracts.spec.ts`:
- Around line 1094-1114: The toolbar fixture in the tabs array uses shortened
action labels, causing inaccurate width measurements. Replace each fixture label
with the exact labels rendered and asserted by the renderer tests, including the
On-Call, Problems, and Radar actions such as “Copy All On-Call Info,” “Export to
CSV,” “Refresh cloud status,” and “Refresh Radar now,” while preserving the
existing tab structure and overflow checks.

In `@tests/e2e/redesign-screenshots.spec.ts`:
- Around line 172-184: Update the containment predicate inside the activePanel
polling callback to ignore buttons whose bounding rectangle has zero width or
height before checking panel bounds. Keep rendered buttons subject to the
existing left/right containment checks.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e76acb06-bc41-4aa1-83d3-ee0d207114cf

📥 Commits

Reviewing files that changed from the base of the PR and between 41ad10e and cecbcdd.

📒 Files selected for processing (40)
  • docs/DESIGN.md
  • docs/superpowers/plans/2026-08-06-all-tab-toolbar-search-alignment.md
  • docs/superpowers/specs/2026-08-06-all-tab-toolbar-search-alignment-design.md
  • src/renderer/src/components/HeaderSearch.tsx
  • src/renderer/src/components/__tests__/HeaderSearch.test.tsx
  • src/renderer/src/components/oncall/oncall.css
  • src/renderer/src/components/tab-chrome/TabChrome.test.tsx
  • src/renderer/src/components/tab-chrome/TabChrome.tsx
  • src/renderer/src/features/knowledge/KnowledgeHome.tsx
  • src/renderer/src/features/knowledge/__tests__/KnowledgeHome.test.tsx
  • src/renderer/src/features/knowledge/__tests__/KnowledgeTypographyStyles.test.ts
  • src/renderer/src/features/knowledge/knowledgeWorkspace.css
  • src/renderer/src/styles.css
  • src/renderer/src/styles/components.css
  • src/renderer/src/styles/cssQualityContracts.test.ts
  • src/renderer/src/styles/modals.css
  • src/renderer/src/styles/tab-chrome.css
  • src/renderer/src/tabs/AlertsTab.tsx
  • src/renderer/src/tabs/AssemblerTab.tsx
  • src/renderer/src/tabs/CloudStatusTab.tsx
  • src/renderer/src/tabs/DynatraceProblemsTab.tsx
  • src/renderer/src/tabs/PersonnelTab.tsx
  • src/renderer/src/tabs/RadarTab.tsx
  • src/renderer/src/tabs/__tests__/AlertsTab.test.tsx
  • src/renderer/src/tabs/__tests__/AssemblerTab.test.tsx
  • src/renderer/src/tabs/__tests__/CloudStatusTab.test.tsx
  • src/renderer/src/tabs/__tests__/DynatraceProblemsTab.test.tsx
  • src/renderer/src/tabs/__tests__/PersonnelTab.test.tsx
  • src/renderer/src/tabs/__tests__/PersonnelTabStyles.test.ts
  • src/renderer/src/tabs/__tests__/RadarTab.test.tsx
  • src/renderer/src/tabs/alerts.css
  • src/renderer/src/tabs/alerts/AlertActionsMenu.tsx
  • src/renderer/src/tabs/alerts/__tests__/AlertActionsMenu.test.tsx
  • src/renderer/src/tabs/assembler/__tests__/AssemblerSidebar.test.tsx
  • src/renderer/src/tabs/assembler/assembler.css
  • src/renderer/src/tabs/cloud-status.css
  • src/renderer/src/tabs/dynatrace-problems.css
  • src/renderer/src/tabs/radar.css
  • tests/e2e/css-visual-contracts.spec.ts
  • tests/e2e/redesign-screenshots.spec.ts
💤 Files with no reviewable changes (3)
  • src/renderer/src/tabs/assembler/tests/AssemblerSidebar.test.tsx
  • src/renderer/src/tabs/assembler/assembler.css
  • src/renderer/src/tabs/alerts.css

Comment thread docs/DESIGN.md Outdated
Comment thread docs/DESIGN.md Outdated
Comment thread src/renderer/src/components/HeaderSearch.tsx
Comment thread src/renderer/src/styles/tab-chrome.css
Comment thread src/renderer/src/styles/tab-chrome.css
Comment thread tests/e2e/css-visual-contracts.spec.ts
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 19:52

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 19:52
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 20:04

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 20:04
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 20:22

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 20:22
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 20:55

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 20:55
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 20:59

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 20:59
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 21:01

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 21:01
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 21:02

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 21:02
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 21:04

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 21:04
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 21:05

Pull request was closed

@CrimsonSoul CrimsonSoul reopened this Aug 6, 2026
@CrimsonSoul
CrimsonSoul enabled auto-merge August 6, 2026 21:05
@CrimsonSoul CrimsonSoul closed this Aug 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

1 participant