Skip to content

fix(workspace-shell): neutralize source header contract#2912

Merged
ctwoodwa merged 2 commits into
mainfrom
fix/2755-workspace-shell-header-w2
Jul 19, 2026
Merged

fix(workspace-shell): neutralize source header contract#2912
ctwoodwa merged 2 commits into
mainfrom
fix/2755-workspace-shell-header-w2

Conversation

@ctwoodwa

@ctwoodwa ctwoodwa commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the WorkspaceShell header's consumer-specific classes with its neutral source-header contract.
  • Re-key the ecosystem-bar stack runtime and generated mirrors to the neutral header/navigation selectors.
  • Apply the 40px ecosystem-bar dvh frame height to Gallery and Translate.

Verification

  • pnpm --filter @shipyard/workspace-shell test -- WorkspaceShell.test.tsx
  • pnpm --filter @shipyard/translation-review test (includes axe coverage)
  • pnpm --filter @shipyard/translation-review build
  • pnpm check:token-discipline:ui-react:ci
  • pnpm audit:css-logical:ci
  • pnpm check:breakpoint-discipline:ui-react

Notes

  • Screenshot spot checks could not run because this Windows session has no available supported browser surface.
  • Gallery's standalone build resolves its file-linked WorkspaceShell package as a copied dependency on this host, so its parent-relative shared imports cannot resolve. The focused WorkspaceShell typecheck completed through its installed tsc6 binary.

Closes #2755

Summary by CodeRabbit

  • Bug Fixes

    • Improved navigation controls and mobile navigation behavior across workspace shell layouts.
    • Updated explorer integrations to reliably detect navigation and header elements.
    • Preserved branded header styling across light and dark themes.
    • Improved translation review app sizing across dynamic viewport dimensions.
  • Refactor

    • Simplified workspace shell header classes for more consistent styling and integration.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

WorkspaceShell now emits a neutral header class. Ecosystem explorer integrations target the updated shell navigation and header structure, Kitchen Sink styling follows the new selectors, and translation review uses dynamic viewport sizing.

Changes

Workspace shell migration

Layer / File(s) Summary
Neutral shell header contract
packages/workspace-shell/src/WorkspaceShell.tsx, packages/workspace-shell/tests/WorkspaceShell.test.tsx
The shell header now uses workspace-shell-source-header without the legacy ks-chrome classes, and the render test verifies the updated class set.
Explorer navigation integration
_shared/design/ecosystem-bar/ecosystem-bar.stack.js, apps/docs/templates/harborline/public/main.js, apps/kitchen-sink/wwwroot/js/ecosystem-bar.stack.js
Explorer mounting locates workspace-shell navigation controls, navigation sources, and headers through the updated selectors, with mobile panel styles targeting the navigation region.
Consumer styling and viewport sizing
apps/kitchen-sink-react/src/app.css, tooling/translation-review/src/App.tsx, tooling/translation-review/src/styles.css
Kitchen Sink header and theme styles target the neutral shell header, while translation review changes its frame sizing to calc(100dvh - 40px).

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description omits required template sections like ICM Stage, Affected Packages, and Checklist. Add the missing template sections and fill them out, including ICM stage, affected packages, and checklist items.
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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the core change: renaming the workspace-shell header contract.
Linked Issues check ✅ Passed The neutral header rename, selector updates, and dvh sizing changes align with issue #2755's coding requirements.
Out of Scope Changes check ✅ Passed The changed files stay within the requested header-contract and frame-height work, with no clear unrelated edits.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2755-workspace-shell-header-w2

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/kitchen-sink-react/src/app.css

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


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.

@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

thought (non-blocking):

Accessibility audit (advisory)

The sharded axe audit is report-only while the baseline and runtime budget mature.
Unknown moderate-or-higher findings must be resolved or added to the reviewed
accessibility baseline.

Shard Result Findings
1/4 pass 0 axe finding(s), 1 coverage warning(s)
2/4 pass 0 axe finding(s), 1 coverage warning(s)
3/4 pass 0 axe finding(s), 1 coverage warning(s)
4/4 pass No moderate-or-higher findings
Shard 1 report
[shipyard-syncstate-indicator] skipping directionalIcons enforcement: component has not opted in via [data-shipyard-direction="<state>"] sentinel.
Shard 2 report
[shipyard-button] skipping keyboardMap enforcement: component has not opted in via data-shipyard-keyboard-map="enabled".
Shard 3 report
[shipyard-dialog] skipping keyboardMap enforcement: component has not opted in via data-shipyard-keyboard-map="enabled".

@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: 1

🧹 Nitpick comments (1)
tooling/translation-review/src/App.tsx (1)

893-893: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

suggestion: Remove redundant physical height class.

You've correctly implemented the logical height calculation min-block-size: calc(100dvh - 40px); in styles.css on the .review-app class. Adding the Tailwind physical utility min-h-[calc(100dvh-40px)] here applies a physical min-height property concurrently, which is redundant and undermines the goal of the CSS logical-property audit.

♻️ Proposed fix
-        className="review-app min-h-[calc(100dvh-40px)]"
+        className="review-app"
🤖 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 `@tooling/translation-review/src/App.tsx` at line 893, Remove the redundant
Tailwind min-h utility from the review-app element’s className in App.tsx,
leaving the existing review-app class so styles.css remains the sole source of
the logical minimum block-size.
🤖 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 `@_shared/design/ecosystem-bar/ecosystem-bar.stack.js`:
- Around line 261-264: Eliminate the duplicated ecosystem-bar selector logic by
making _shared/design/ecosystem-bar/ecosystem-bar.stack.js the single source of
truth, configured through the build system or imported directly. Remove the
corresponding hand-copied selectors from
apps/docs/templates/harborline/public/main.js and
apps/kitchen-sink/wwwroot/js/ecosystem-bar.stack.js, ensuring both consumers
obtain the shared implementation.

---

Nitpick comments:
In `@tooling/translation-review/src/App.tsx`:
- Line 893: Remove the redundant Tailwind min-h utility from the review-app
element’s className in App.tsx, leaving the existing review-app class so
styles.css remains the sole source of the logical minimum block-size.
🪄 Autofix (Beta)

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: 1b4c9630-2101-4975-aa08-53b066422aed

📥 Commits

Reviewing files that changed from the base of the PR and between 2f6104c and b80707c.

⛔ Files ignored due to path filters (1)
  • _shared/design/ecosystem-bar/dist/ecosystem-bar.docfx.js is excluded by !**/dist/**, !**/dist/**
📒 Files selected for processing (8)
  • _shared/design/ecosystem-bar/ecosystem-bar.stack.js
  • apps/docs/templates/harborline/public/main.js
  • apps/kitchen-sink-react/src/app.css
  • apps/kitchen-sink/wwwroot/js/ecosystem-bar.stack.js
  • packages/workspace-shell/src/WorkspaceShell.tsx
  • packages/workspace-shell/tests/WorkspaceShell.test.tsx
  • tooling/translation-review/src/App.tsx
  • tooling/translation-review/src/styles.css

Comment on lines +261 to +264
'.workspace-shell-source-header [data-shell-command="toggle-navigation"],' +
'.top-navbar [data-shell-command="toggle-navigation"],' +
'.ks-chrome button[aria-label="Collapse component navigation"],' +
'.ks-chrome button[aria-label="Expand component navigation"],' +
'.workspace-shell-source-header button[aria-label="Collapse component navigation"],' +
'.workspace-shell-source-header button[aria-label="Expand component navigation"],' +

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

issue (blocking): Hand-parallel duplication of single-source logic.

As per path instructions, we must avoid hand-parallel duplicate copies of single-source things (A4). The exact same ecosystem-bar selector updates have been manually copy-pasted across the shared stack file and both consumer applications.

  • _shared/design/ecosystem-bar/ecosystem-bar.stack.js#L261-L264: Prevent manual duplication here by configuring the build system to copy this single source of truth, or by importing it directly.
  • apps/docs/templates/harborline/public/main.js#L861-L864: Remove this hand-parallel copy.
  • apps/kitchen-sink/wwwroot/js/ecosystem-bar.stack.js#L261-L264: Remove this hand-parallel copy.
📍 Affects 3 files
  • _shared/design/ecosystem-bar/ecosystem-bar.stack.js#L261-L264 (this comment)
  • apps/docs/templates/harborline/public/main.js#L861-L864
  • apps/kitchen-sink/wwwroot/js/ecosystem-bar.stack.js#L261-L264
🤖 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 `@_shared/design/ecosystem-bar/ecosystem-bar.stack.js` around lines 261 - 264,
Eliminate the duplicated ecosystem-bar selector logic by making
_shared/design/ecosystem-bar/ecosystem-bar.stack.js the single source of truth,
configured through the build system or imported directly. Remove the
corresponding hand-copied selectors from
apps/docs/templates/harborline/public/main.js and
apps/kitchen-sink/wwwroot/js/ecosystem-bar.stack.js, ensuring both consumers
obtain the shared implementation.

Source: Path instructions

@ctwoodwa

Copy link
Copy Markdown
Contributor Author

Immutable-head receipt — reviewed b80707cef3d891ecdfbca1c07c2a2bb66bfe7c69 only.

Focused verification passed on the exact head:

  • WorkspaceShell: 8/8 tests
  • translation-review: 18/18 tests
  • translation-review production build: passed

Mac browser matrix attempted with installed Google Chrome for 1440x900 and 390x844, light/dark axe, viewport-height, screenshots, and keyboard focus order. This managed host aborts Chrome immediately after launch under its sandbox, before a page/context can be created (SIGABRT), so no browser evidence is claimed. No source edits, arming, or merge action taken.

@ctwoodwa ctwoodwa left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

CHANGES — exact head b80707cef3d891ecdfbca1c07c2a2bb66bfe7c69

issue (blocking): tooling/translation-review/src/App.tsx:893 adds min-h-[calc(100dvh-40px)] on the same frame where styles.css:42 already sets min-block-size: calc(100dvh - 40px). This creates duplicate physical/logical sizing authorities and fails card 2755's explicit no-logical-property-drift condition. The required CSS logical-properties gate runs CSS-only, so its green result does not cover this JSX utility. Remove the physical Tailwind utility and leave className="review-app" so the logical declaration is the single source.

All other adjudication evidence passed at this head: WorkspaceShell 8/8; Translation Review 18/18 including axe; WorkspaceShell typecheck; Translation Review and Gallery production builds; ecosystem-bar generated no-diff; token, logical-CSS, and breakpoint gates; and a sandboxed Chromium sweep completing 512/512 Gallery light/dark axe scans with zero route or scan errors. Exact-head CI is fully green. The neutral source-header selectors and the 40px + calc(100dvh - 40px) runtime viewport math are correct.

Leave this PR open and unarmed pending the logical-property correction.

@ctwoodwa

Copy link
Copy Markdown
Contributor Author

Correction pushed at exact head d3d1e8750.

  • removed the redundant physical min-h-[calc(100dvh-40px)] utility from
    tooling/translation-review/src/App.tsx
  • retained .review-app as the single logical sizing authority
  • Translation Review: 18/18 tests passed
  • Translation Review production build passed
  • CSS logical-properties audit: 0 findings
  • breakpoint-discipline gate exited zero (12 standing warnings, none introduced by this one-line correction)

Please run fresh Layer-0 and UX review at this head. The pre-existing unresolved CodeRabbit
single-source thread remains open for adjudication; this comment does not claim it resolved.

@ctwoodwa
ctwoodwa merged commit 2c121bc into main Jul 19, 2026
47 checks passed
@ctwoodwa
ctwoodwa deleted the fix/2755-workspace-shell-header-w2 branch July 19, 2026 14:55
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.

workspace-shell polish: finish ks-chrome->neutral token rename + verify dvh frame math (2733 review F2/F3)

1 participant