Repository navigation
fix(site/src/pages/WorkspaceBuildPage): render build sidebar rows as links, not buttons inside links - #31870
Merged
Conversation
…links, not buttons inside links
…idebar-links # Conflicts: # site/src/pages/WorkspaceBuildPage/Sidebar.tsx
aqandrew
temporarily deployed
to
docs-preview
November 12, 2026 21:21 — with
GitHub Actions
Inactive
Contributor
|
Late to the review but heck yeah a much needed fix!! ✨ |
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Note
This PR was generated by Coder Agents on behalf of @aqandrew.
Each build row in the workspace build page sidebar (
/@user/workspace/builds/:number) rendered as a<button>inside an<a>. That is invalid HTML and fails axenested-interactive. Keyboard users had two tab stops per row, and screen readers could announce the row content twice.Each row is now a single react-router
Link(SidebarLink) witharia-current="page"on the active build. Skeleton rows render as a non-interactivediv(SidebarItemSkeleton) instead of empty buttons. The sidebar looks the same as before.No DEQ ticket matches this page. The existing
nested-interactivetickets cover Audit Logs, Create Template, Templates Listing, Workspace Sharing and TemplateBuilder Step 2. This came up in review of #30819: #30819 (comment)Notes and verification
Changes
Sidebar.tsx: replace the<button>SidebarItemwithSidebarLink(LinkProps & { active: boolean }, setsaria-currentwhen active) and addSidebarItemSkeleton.WorkspaceBuildPageView.tsx: render each build row as<SidebarLink to active>aroundWorkspaceBuildData, and useSidebarItemSkeletonfor loading rows.WorkspaceBuildPageView.test.tsx(new): asserts the active build is the link witharia-current="page", and that Tab moves link to link with one stop per build. Pixel screenshots cannot catch either behavior. The test fails on main and passes with this change.Decisions
NavLinkwas considered and rejected. It ties the active state to the URL, but the view takesactiveBuildNumberas a prop.Out of scope
site/src/pages/WorkspacePage/HistorySidebar.tsx:48skeleton rows still use the<button>SidebarItemfromcomponents/FullPageLayout/Sidebar.tsx, so they are focusable empty buttons. That belongs with the button-name work.Verification
pnpm testforWorkspaceBuildPageView.test.tsxandWorkspaceBuildPage.test.tsx: pass.pnpm lint:types, biome: pass.active, fixture naming) are addressed.