Skip to content

fix: title project picker rows by folder name on windows paths - #35550

Merged
bolichen97 merged 1 commit into
mainfrom
fix/33916-project-picker-basename
Nov 18, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/33916-project-picker-basename

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On a Windows gateway, the dashboard project picker titles each Recent and Favourites row with the project's folder name, not its whole path.

The project picker shows each Recent and Favourites row as a bold title over a muted full path. A Windows gateway serves native paths such as D:\work\proj, which hold no /. The title was taken with d.split('/').pop(), so it came out as the whole path, the same text as the muted line under it.

Why it matters

The bold title is how a user tells projects apart in the picker. On Windows, projects under one home folder share a long prefix, and the title is truncated from the right, so every row reads the same and the user has to hover or guess. The composer chip and the Spec Builder picker already show the folder name for the same paths (#28663); this picker was the one left behind.

Not a goal

  • Changing what the muted line shows: it keeps the native path the user recognises.
  • Normalising paths to / on the server, or changing how recent and favourite projects are stored or served.
  • Other /-only splits elsewhere in the dashboard that name something other than a picker's project folder (see the sibling sweep).

What changed (motivation → approach → change)

A Recent or Favourites row for D:\work\proj is now titled proj, with D:\work\proj still in the muted line. POSIX rows read as before, except that a path ending in / is titled by its folder and a bare / is titled /, where both showed a blank line.

The title was a /-only split, which cannot see a Windows separator. The project already has a display helper for this, pathBasename with stripTrailingSeparators in utils/pathBasename.ts, which treats \ as a separator only in a drive-rooted or UNC path, so a POSIX name holding a backslash stays whole. frontend-conventions.md names it as the way to show a gateway path's file name.

ProjectPicker.tsx titles both rows with pathBasename(stripTrailingSeparators(d)) || d, the expression the Spec Builder picker uses. The || d titles a bare root such as / with the root itself rather than a blank line; a drive root such as C:\ is titled C:.

Backwards compatibility

Compatible: for a POSIX path without a trailing / the title is the same last segment as before; a path ending in / is titled by its folder and a bare / by itself instead of a blank line, and a drive root reads C:; nothing is accepted or rejected differently.

Removes nothing: the change only alters which characters a row's title shows.

Tests

  • ProjectPicker.test.tsx: a Recent list holding D:\work\proj, a UNC path, a Windows path with a trailing \, /home/u/posix, /home/u/slash/ and /tmp/we\ird titles each row proj, shared, trail, posix, slash and we\ird, with the full path in the same row.
  • ProjectPicker.favorites.test.tsx: a Favourites row for D:\work\proj is titled proj with the full path beside it.

Red before the fix: with the parent's ProjectPicker.tsx under these two spec files, 2 of their 57 tests fail (the row is titled D:\work\proj), and all 57 pass with the fix. Determinism: the two files together (57 tests per run) passed 10 consecutive runs, each with --sequence.shuffle and a fixed seed (101, 2027, 3301, 4409, 5521, 6637, 7741, 8853, 9967, 11071).

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Reproduced and smoke-tested on Ubuntu 24.04 (Linux), node v24, headless Chromium 145 through Playwright, against an isolated gateway built from this checkout with a real POSIX Recent folder and Favourite folder. Only /api/recent-projects and /api/favorite-projects were answered with native Windows paths added in front of the real ones, because a Linux gateway drops any entry that is not an existing directory.

Tab Muted line Bold title on the parent Bold title on this head
Recent D:\work\api-gateway D:\work\api-gateway api-gateway
Recent D:\work\billing-service D:\work\billing-service billing-service
Recent \\fileserver\share\web-console \\fileserver\share\web-console web-console
Recent C:\Users\dev\notes\ C:\Users\dev\notes\ notes
Recent real POSIX folder posixproj posixproj
Favourites D:\work\api-gateway D:\work\api-gateway api-gateway
Favourites \\fileserver\share\web-console \\fileserver\share\web-console web-console
Favourites real POSIX folder posixfav posixfav

Dark and light theme read the same. The two new vitest cases fail on the parent's ProjectPicker.tsx and pass on this head.

Screenshots / video

Project picker, opened from the composer's project chip (dark theme, the dashboard built from this head and from its parent, with the two project-list reads answered as above).

Before After
Recent Recent before Recent after
Favourites Favourites before Favourites after
Light theme (the picker rendered on its own from this head and its parent, reads stubbed)
Before After
Recent Recent before, light Recent after, light
Favourites Favourites before, light Favourites after, light

Related Issues

Closes #33916

Sibling sweep

Swept: git grep -nE "split('/')(.filter(Boolean))?.pop()" -- website/src/components website/src/pages (non-test files)
Sibling: website/src/components/ProjectPicker.tsx -- changed here
Sibling: website/src/components/WorkspacePicker.tsx:139 -- not affected -- no dashboard surface mounts WorkspacePicker, only comments name it (also :175, a listing filter)
Sibling: website/src/components/CodeEditor.tsx:41 -- not affected -- the name is only the editor's file identity: its file header is off and a whole Windows path still ends in the file's extension
Sibling: website/src/components/ContentRenderer.tsx:113 -- not affected -- the same file identity, and the language is passed separately as langHint
Sibling: website/src/components/FileChangeChips.tsx:174 -- not affected -- it folds Windows separators with normalizeWindowsPath before the split
Sibling: website/src/components/HookSkillsSelect.tsx:74 -- not affected -- it shortens a skill key, which is always /-separated
Sibling: website/src/components/HookSkillsDropdown.tsx:119 -- not affected -- it shortens a skill key, which is always /-separated
Sibling: website/src/components/markdown/Lightbox.tsx:83 -- not affected -- it splits a URL pathname, which is always /-separated
Sibling: website/src/pages/AppDetailPage.tsx:1874 -- not affected -- app manifest entries are /-separated package paths (also :1880)
Sibling: website/src/pages/apps/LibraryPage.tsx:503 -- not affected -- it shortens an app id, not a filesystem path (also :509, :527, :536)

Pattern harvest

Not generalizable: the repository already pins this class for other sites (windowsBasenameSites.test.tsx, windowsProjectNameSites.test.tsx), and this picker's two rows are pinned by its own spec files; a lint over every split('/').pop() would flag URL paths, skill keys and app ids that are correctly /-only.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 11, 2026 20:18
@bolichen97
bolichen97 enabled auto-merge (squash) November 11, 2026 20:48
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 11, 2026
@bolichen97 bolichen97 closed this Nov 13, 2026
auto-merge was automatically disabled November 13, 2026 09:23

Pull request was closed

@bolichen97 bolichen97 reopened this Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b006bd9acee70a42465305eaa4dd26e00d8fc8c4 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b006bd9

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b006bd9acee70a42465305eaa4dd26e00d8fc8c4 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b006bd9acee70a42465305eaa4dd26e00d8fc8c4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the fix reuses the existing pathBasename display helper that the Spec Builder picker already uses. It changes nothing persisted or served, and rendered before/after evidence is attached.

[DESIGN-REVIEWED] b006bd9

Description read

[DESCRIPTION-READ] 634ebce26ca5ad3aef5b5a7ee7e4c570364edb57a8a650c1381d9023b6491ca6

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of b006bd9acee70a42465305eaa4dd26e00d8fc8c4 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: let a Windows gateway user tell Recent and Favourites projects apart by folder name in the picker. This is a FIX.

  1. Recent rows for a Windows path now show the folder name as the bold title — justified
  2. Favourites rows for a Windows path now show the folder name as the bold title — justified
  3. A POSIX path ending in / now shows its folder name as the title, and a bare / shows /; both used to show a blank title — justified

[FIRST-PRINCIPLES-REVIEWED] b006bd9

Description read

[DESCRIPTION-READ] beaf772e6532959cc04195951a449816b2085e44103cb0c8ef4fa1e87d8abf99

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b006bd9acee70a42465305eaa4dd26e00d8fc8c4 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b006bd9

Verdict parsed from the review's SHA-scoped output markers for commit b006bd9acee70a42465305eaa4dd26e00d8fc8c4.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b006bd9acee70a42465305eaa4dd26e00d8fc8c4 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of b006bd9acee70a42465305eaa4dd26e00d8fc8c4 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. Every changed row title (Recent and Favourites, dark and light) has a before and after screenshot, and the blind reader read the after state correctly: "much easier to read… now every row looks the same."

Notes

  • The light-theme screenshots (shots 5–8) show api-gateway and web-console with empty stars on Recent but filled stars on Favourites. The author stubbed the data for those screenshots, so this is probably not a product bug. Still, it made the reader doubt which projects are favourites. Retaking the light Recent screenshots with the favourites list stubbed the same way would make the evidence consistent.

[UX-REVIEWED] b006bd9

Description read

[DESCRIPTION-READ] fb16c9e425639b48a10bee4b2303384bfb1290a90b254da80153bface1136b6f

That sha256 names everything this verdict read: the PR description, plus the 11 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@bolichen97
bolichen97 force-pushed the fix/33916-project-picker-basename branch from f810dbf to c0847b3 Compare November 13, 2026 15:03
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/components/ (98 files beside ProjectPicker.tsx) since this head was judged (f9788c5 -> d4b0a0b); CI re-running.

The Source Gates red on f810dbf was main's own docs-lint finding (an RFC not linked from its index), fixed on main by #36504; this head carries it. Await Fast Gate and Coverage Gate were red only because Fast Gate was, and the Analyze (python) red was a GitHub API rate limit, not code. The diff is unchanged.

[operator: bolichen97]

The dashboard project picker titled each Recent and Favourites row
with the text after the last "/", so a native Windows path such as
D:\work\proj showed the whole path as its bold title, the same text
as the muted line under it. Title both rows with the shared
pathBasename helper, as the Spec Builder picker already does.

Closes #33916
@iamwhatever
iamwhatever force-pushed the fix/33916-project-picker-basename branch from c0847b3 to b006bd9 Compare November 18, 2026 16:44
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 18, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 4% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier pending: being reviewed.

Display-only fix: Recent and Favourites row titles in ProjectPicker now use the existing separator-aware helper pathBasename(stripTrailingSeparators(d)) || d (the same expression as the Spec Builder picker, the composer chip and about ten other dashboard sites), so native Windows paths are titled by folder name. Selection, the favourite star, row keys and the muted path line still use the raw path, so nothing stored or served changes. New tests cover drive, UNC, trailing-separator, POSIX and backslash-in-POSIX-name cases, and the Windows ones would fail on the old split. CI is green.

Tier: pending: being reviewed.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit b006bd9ace · 39 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed head b006bd9. The force-push to this head was a clean rebase onto newer main: its patch is byte-identical to the previous head c0847b3, and no other commit was on the branch in between, so nothing was lost. Both picker rows now take their title from the shared separator-aware basename helper. Keys, selection and the full-path line still use the raw path, so the change only affects what is displayed. Both spec files pass (57 of 57) on this head, and the two new tests fail when the parent's component is swapped in, so they really pin the fix. CI is green, and I found nothing that blocks.

@bolichen97
bolichen97 merged commit 799d78e into main Nov 18, 2026
98 checks passed
@bolichen97
bolichen97 deleted the fix/33916-project-picker-basename branch November 18, 2026 17:49
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 18, 2026
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.

Dashboard project picker on Windows: Recent and Favourites rows show the whole path as their title, two split('/').pop() sites #28663 did not reach

2 participants