Skip to content

fix(privacy): name workspaces by folder, never by path or user name - #405

Open
Sanjay Singh (san360) wants to merge 18 commits into
mainfrom
san360-fix-dashboard-workspace-path-privacy
Open

Sanjay Singh (san360) wants to merge 18 commits into
mainfrom
san360-fix-dashboard-workspace-path-privacy

Conversation

@san360

@san360 Sanjay Singh (san360) commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

The Dashboard's Top Workspaces by Requests legend and tooltip showed full local paths, including the home folder and user name, in both hosts (VS Code webview and the canvas host). Root cause: Copilot CLI and Copilot app sessions on Windows were named by their full cwd from workspace.yaml (C:\Users\<name>\…, or the long form \\?\C:\Users\<name>\… the Copilot app logs), because the name was split on / only. Every surface that shows workspace names inherited it: the chart, the sidebar workspace list, Context Health's treemap, anti-pattern details, Insights/Curiosity/Flow data and the @aicoach chat tool. Separately, a workspace opened in the home folder was named after the account in every harness.

Fix at the source, one shared helper (reusing src/core/display-path.ts from #393, which is already browser-safe):

  • workspaceFolderName(root, home): the folder name for either separator and Windows long paths; ~ for the home folder, a folder named after the account, or another account's home (/home/<x>, <drive>:\Users\<x>, WSL/remote homes).
  • All parsers that name a workspace from a folder (Copilot CLI/app workspace.yaml, VS Code workspace.json, Codex, OpenCode, Claude Code) go through workspaceNameFromRoot. CACHE_VERSION 34 → 36 so cached sessions are re-parsed.
  • GitHub handle: the Copilot app names worktree folders <handle>-<words> and pull-request folders pr-<n>-<handle>-<words>, so workspace names carried the signed-in GitHub handle (Patterns cards, the sidebar list, the @aicoach context, credits and code tools). A signed-in handle (Copilot config.json, gh hosts.yml) is removed wherever it is a whole -/_ part of a folder name, the rule branch names already follow (scrubBranch). The disk, memory and panel caches record the handles their names were written under, from when the parse started, and are rebuilt after a sign-in change.
  • shortenHomePath now handles \\?\ and \\?\UNC\ long paths. Copilot CLI cwd is read with yamlScalar (quoted values), and a long path to a drive is accepted as the folder (network/WSL shares are still not probed).
  • Both hosts send the open window's name through the same rule (currentWorkspaceName), so Current still finds a window opened on the home folder.
  • Top workspaces: same-named folders are no longer merged when their sessions logged different folders. workspaceDisplayLabels adds parent folders until labels differ (team-a/api, team-b/api), then numbers them. Hovering a slice (small chart and full-size view) shows the folder path with ~ for home and … for an account name (yours or another account's). Editor chats' folders come from the parse result's source index. The analyzer sends labels and hover paths; the webview never sees a raw path.

Top workspaces with folder names in the legend and a ~ path in the tooltip (synthetic e2e data)

Scope decisions (from the user): shorten Top workspaces labels to folder names; one PR from main; nothing private in GitHub (synthetic screenshots only).

Behavior notes: a workspace opened in a home folder is now named ~ in every harness. Windows Copilot CLI/app workspaces with the same folder name now share one entry in the workspace list, filter and Workspaces total, as same-named folders already did for VS Code, Claude, Codex and OpenCode; only Top workspaces keeps them apart. Copilot app sessions on Windows now get their custom-instructions size (their long-path folder was unreadable), so instruction-bloat can evaluate them.

Real-data check (read-only, aggregates only)

Canvas host built from main and from this branch (re-measured at 05c592c), both on the same real logs (fake HOME with dot-folder junctions, real USERPROFILE, cold cache). Counts are strings shown on screen that contain the home path or the user name; canvas text was recorded through fillText.

Surface main this PR
Dashboard: Top workspaces legend + tooltip (canvas) 14 0
Sidebar workspace list 31 0
Context Health treemap (canvas) 7 0
Anti-patterns page 27 2 *
@aicoach chat tool (all 15 formatters) 53 0
Summary export (Markdown + JSON) 0 0
Other pages' first view 0 0

* Quoted prompt text that itself contains a path: a different kind of change, listed below as a follow-up.

Follow-ups (not in this PR)

  • Free text quoted from prompts (anti-pattern details/examples, Skill Finder cluster examples, Curiosity prompt previews) can contain paths; scrubbing quoted text is a different change.
  • File paths outside the workspace: Patterns ▸ Projects "Hot files" (topFiles) and Context Health "Top Referenced Files" show full paths.
  • Sent to the webview but not rendered: getConfigHealth workspaces[].rootPath, Image Gallery editedFiles (only their count is used).
  • Keeping same-named folders apart in the workspace list, filter and totals (workspace identity is the name today).

Related Issues

Found while testing #401.

Checklist

  • npm run check passes (typecheck + lint + spellcheck + knip + tests)
  • Changes are covered by tests (if applicable)
  • Documentation updated (if applicable)
  • User-visible changes are described in a changelog.d/<PR number>.md fragment

Validation

Head c1da071 (includes main f8117e9). Windows 11 ARM64, Node 24.

  • npm run check: passed. Typecheck ✓, lint 0 errors / 494 warnings (equal to main's 494), spellcheck 0 issues in 472 files, knip ✓, lockfile-lint ✓, vitest 200 files: 4306 passed, 5 skipped.
  • npm run build, npm run package (1.79 MB), npm run check-size (dist/extension.js 1.87 MB of 2 MB): passed.
  • E2E_PORT=4167 npx playwright test --workers=2: 259 passed, 7 skipped.
  • npm run test:vscode -- --vsix ai-engineer-coach-0.1.0.vsix: passed (1 + 5 + 9). The families scenario's workspace folder is <handle>-shop under the home folder; the sidebar list and the Patterns project card read shop (both fail on 244129b).
  • Failing first: every new unit test fails on the code before its fix (git stash push -- <src>); the new Playwright and VSIX checks fail without their fix.
  • Real data (read-only, fake HOME with the real USERPROFILE): strings with the signed-in handle, 244129b → c1da071: Patterns card names 9 → 0, @aicoach context 6 → 0, credits 5 → 0, code 2 → 0, sidebar list 266 → 0, Top workspaces chart 22 → 0, Context Health treemap 6 → 0; home path or account name on these surfaces 0. A cold load took 6.8 s, a warm load 3.4 s (the handles check keeps the cache).

Copilot CLI and Copilot app sessions on Windows were named by their full
`cwd` (for example `C:\Users\<name>\...` or `\\?\C:\Users\<name>\...`),
because the workspace.yaml name was split on `/` only. The full path then
showed in the Dashboard's Top workspaces legend and tooltip, the sidebar
workspace list, Context Health's treemap, anti-pattern details and the
@aicoach chat tool. A workspace opened in the home folder was named after
the account in every harness.

- display-path: workspaceFolderName (folder name, `~` for the home folder,
  long paths), workspaceRootKey and workspaceDisplayLabels (same-named
  folders get parent folders; hover paths use `~` and hide the account).
- Parsers (Copilot CLI/app, VS Code, Codex, OpenCode, Claude) name
  workspaces through workspaceNameFromRoot; CACHE_VERSION 35 re-parses.
- Top workspaces keeps same-named folders apart and shows the `~` path on
  hover in the chart and its full-size view.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved issues cause same-named VS Code workspaces to merge or be misassigned, while quoted YAML paths and short home-directory names can expose account names.

3 open issues
What changed in this PR

This PR centralizes workspace display naming to reduce local-path and account-name exposure across the extension’s dashboard and other workspace-name surfaces, building on the display-path helpers from #393.

Changes:

  • Routes folder-based workspace names through shared privacy helpers, including Windows long-path handling.
  • Adds root-based separation, distinguishing labels, and shortened hover paths to the Top Workspaces chart.
  • Invalidates older caches and adds regression tests, documentation, and a changelog entry.
File Description
tests/​vscode/​suite/​families.spec.ts Checks folder-only workspace names in the packaged extension.
tests/​vscode/​dashboard.ts Adds a helper for collecting matching elements’ text.
tests/​e2e/​harness.html Supplies shortened workspace paths in mock chart data.
tests/​e2e/​dashboard.spec.ts Checks chart labels and hover text drawn on canvas.
src/​webview/​page-dashboard.ts Uses workspace hover paths in both chart sizes.
src/​core/​types/​analytics-types.ts Adds hover paths to the workspace breakdown contract.
src/​core/​parser-vscode-files.ts Uses shared naming for VS Code and CLI workspaces.
src/​core/​parser-vscode-files.test.ts Covers Windows paths and home-folder naming.
src/​core/​parser-shared.ts Adds the shared parser workspace-name helper.
src/​core/​parser-opencode.ts Adopts shared workspace naming for OpenCode.
src/​core/​parser-codex.ts Adopts shared workspace naming for Codex.
src/​core/​parser-claude.ts Adopts shared naming for Claude workspace paths.
src/​core/​display-path.ts Adds workspace naming, root normalization, and label disambiguation.
src/​core/​display-path.test.ts Covers path normalization, privacy, and distinguishing labels.
src/​core/​cache.ts Bumps the cache version to refresh workspace names.
src/​core/​cache.test.ts Checks rejection of caches containing older names.
src/​core/​analyzer-dashboard.ts Groups chart entries by logged roots and prepares display paths.
src/​core/​analyzer-dashboard.test.ts Covers same-named folders and shortened hover paths.
docs/​content/​observe/​dashboard.md Documents workspace labels and chart hover behavior.
changelog.d/​405.md Records the workspace privacy and chart changes.

Review effort: Balanced

Comment thread src/core/analyzer-dashboard.ts Resolved
Comment thread src/core/display-path.ts Resolved
Comment thread src/core/parser-vscode-files.ts Resolved
- Top workspaces reads a session's folder from the parse result's source
  index too, so same-named VS Code folders stay apart (editor chats keep
  their root there, not on the session, which Curiosity also reads).
- Copilot CLI workspace.yaml `cwd` is read with yamlScalar, so a quoted
  home folder reads `~` and naming and folder path agree.
- A folder named exactly like the account reads `~` for any account length.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 1 summary (head 4fc352a)

Item Verdict Fix Failing-first test
Editor roots live in the source index, so same-named VS Code folders merged Valid Root lookup passed from the RPC handler (session root, else source index); session not mutated because Curiosity reads its root analyzer-dashboard-workspaces.test.ts, panel-rpc.test.ts
Short account names not hidden by the exact-name check Valid No length threshold for the exact folder-name = account comparison display-path.test.ts
Quoted YAML cwd not decoded Valid yamlScalar for name and folder path parser-vscode-files.test.ts

Gates: npm run typecheck ✓, lint at main's baseline (490 warnings), targeted vitest ✓. Full gates will rerun before the next round.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The changes break the Current filter for home-folder workspaces and reject Windows long paths during root resolution, causing same-named folders to merge and tooltips to omit folder paths.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Accept Windows long paths in folder resolution

src/​core/​parser-vscode-files.ts:527

The folder resolver rejects Windows long paths such as \\?\C:\Users\Dev\team-a\api at the absolute-path guard. When workspace.yaml is the only root metadata, same-named folders still merge into one Top workspaces slice and their tooltips have no folder path. Accept Windows long/UNC absolute paths here, preserving the original path, and extend the long-path fixture to check root resolution as well as naming.

3 resolved since last review

Review effort: Balanced

Comment thread src/core/parser-vscode-files.ts Resolved
…s (review)

- Both hosts send the open window's name in the form sessions are named by
  (currentWorkspaceName), so a window opened on the home folder matches its
  `~` sessions in the Current filter.
- parseCLIWorkspaceFolderPath accepts Windows long (`\\?\C:\...`) and UNC
  paths, so a Copilot app folder keeps its root for Top workspaces.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 2 summary (head e172d4d)

Item Source Verdict Fix Failing-first test
Current filter misses a window opened on the home folder (sessions now say ~) inline thread Valid Both hosts send currentWorkspaceName(window name), the same rule sessions use panel.test.ts, display-path.test.ts
parseCLIWorkspaceFolderPath rejects Windows long and UNC paths, so a Copilot app folder loses its root review body (previously missed) Valid Long and UNC paths are accepted as given parser-vscode-files.test.ts

Side effect, intended: Copilot app sessions on Windows now get customInstructionsBytes (their folder was unreadable before), so the instruction-bloat rule can evaluate them. CACHE_VERSION is already raised in this PR.

Gates: typecheck ✓, lint at main's baseline (490), targeted vitest ✓.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new hover path can expose remote account names when they differ from the local username, requiring redaction of recognized remote-home paths and test coverage for mismatched usernames.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Redact remote usernames from hover paths and labels

src/​core/​display-path.ts:138

The new hover path exposes remote account names when they differ from the local home-directory basename. For example, with home C:\Users\Dev, a session rooted at /home/alex/work/api produces the unchanged tooltip /home/alex/work/api: neither replacement recognizes alex. Previously this chart showed only api, so this introduces account-name exposure for imported/WSL/remote logs. Redact the account component of recognized remote-home paths before returning hover paths or using their segments to disambiguate labels, and cover differing local and remote usernames.

1 resolved since last review

Review effort: Balanced

…review)

A remote, WSL or other user's home (`/home/alex/...`, `D:\Users\alex\...`,
`\\wsl.localhost\Ubuntu\home\alex\...`, `vscode-remote://host/home/alex`)
kept its account name in the Top workspaces hover path, and a workspace that
is such a home folder was named after the account. The account segment after
a root-level `home` or `Users` is now `…` in hover paths and labels, and such
a home folder is named `~`.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 3 summary (head 05c592c)

Item Source Verdict Fix Failing-first test
Hover path keeps another account's name (remote/WSL/other user, e.g. /home/alex/work/api when the local account differs) review body (previously missed) Valid The segment after a root-level home or Users (path, drive, UNC/WSL share or URI host) becomes … in hover paths and labels; a workspace that is such a home folder is named ~ display-path.test.ts (3 tests)

One existing expectation changed: parser-claude.test.ts 'a cwd outside the project folder' falls back to the project folder, which resolves to a folder directly under /home, so it is now named ~ instead of me-proj (a home folder by the new rule).

Gates: npm run check: typecheck, lint at main's baseline (490), spellcheck, knip, 4240 unit tests pass. scripts/build-changelog.test.mjs timed out once under full-suite load on this machine and passes alone (6/6, twice); it builds its own temp git repo and doesn't read the changed code.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because findings omitted from the published review identify call-order-dependent cache results and UNC filesystem probes that can block dashboard startup.

No open issues 🎉

Review effort: Balanced

… (review)

- Analyzer.getWorkspaceBreakdown caches with and without a root lookup
  separately, so the result doesn't depend on which was asked first.
- parseCLIWorkspaceFolderPath accepts a Windows long path to a drive only;
  network and WSL shares are not probed, since a share that doesn't answer
  would stall parsing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 4 summary (head 86b44a8)

The round had no threads; the overview said unpublished findings concern 'call-order-dependent cache results and UNC filesystem probes that can block dashboard startup'. How I read and fixed them:

Item Verdict Fix Failing-first test
Analyzer.getWorkspaceBreakdown cached one entry per filter, whether or not a root lookup was passed: a call without it could be served to the RPC Valid (no such caller today, but the result must not depend on call order) Separate cache entries analyzer-dashboard-workspaces.test.ts
Round 2 let parseCLIWorkspaceFolderPath return UNC/WSL shares, which the parse worker then probes synchronously (custom-instructions size): an unreachable share can stall parsing Valid Only a long path to a drive (\\?\C:\...) is accepted; \\server\share and \\?\UNC\... return null as on main. The name still comes from the folder. parser-vscode-files.test.ts

Gates: typecheck ✓, lint at main's baseline (490), targeted vitest ✓. Full e2e at 05c592c: 259 passed, 7 skipped.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because workspace-naming edge cases can break Current selection and merge unrelated projects in workspace lists and totals.

No open issues 🎉

Review effort: Balanced

@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 5 summary (head 86b44a8): no open issues and no threads. The overview notes 'workspace-naming edge cases can break Current selection and merge unrelated projects in workspace lists and totals'. How I read it:

Item Verdict Reason
Current selection Already handled (round 2) Both hosts send the window name through the same rule sessions use (currentWorkspaceName); covered by panel.test.ts and display-path.test.ts
Same-named folders merge in the workspace list, filter and Workspaces total Out of scope by decision; recorded as an open question Workspaces are identified by name across the extension (getWorkspaces, filters, stats). VS Code, Claude, Codex and OpenCode already merged same-named folders on main; this PR makes Windows Copilot CLI/app sessions consistent with them. As decided for this PR, only Top workspaces keeps same-named folders apart (team-a/api, team-b/api). Splitting them everywhere would change the workspace identity model, a separate change.

Stopping the review loop: this round has no actionable findings and repeats earlier themes.

Full gates at 86b44a8: npm run check ✓ (4242 tests, lint 490 = main's baseline, spellcheck 0 issues, knip ✓), build ✓, package ✓ (VSIX 1.78 MB), check-size ✓ (dist/extension.js 1.86 MB of 2 MB), packaged VSIX suites ✓ (1 + 4 + 9 passing, including the new Windows-path check in the families scenario). Full e2e at 05c592c (diff since then is host-only): 259 passed, 7 skipped.

@san360
Sanjay Singh (san360) marked this pull request as ready for review December 1, 2026 11:42
…(review)

A WSL mount (/mnt/c/Users/<x>, also behind a WSL share or a remote URI), a host-less WSL path, a share named home or Users, and a remote's Windows drive are recognized as other accounts' homes, as in the file lists (#407): hidden in hover paths, and such a home folder is named ~.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Round 7 (requested follow-ups found by the #407 session) and Copilot review round 7 summary, head 72ae3cf

Item Source Verdict Fix Failing-first test
workspaceDisplayLabels hid the account name before other accounts' home folders, so an account named home exposed /home/ #407 session Valid Other homes first, then the account (same rule as #407's hideAccounts) display-path.test.ts
Workspace names kept the signed-in GitHub handle: Copilot app folders are - and pr---, so Patterns cards, the sidebar list and the aicoach context/credits/code tools showed it #407 session Valid Folder names drop a signed-in handle wherever it is a whole -/_ part (branch names already drop it: scrubBranch); in every parser, Top workspaces labels and hover paths, and the Current filter name. CACHE_VERSION 36 display-path.test.ts, parser-vscode-files.test.ts, cache.test.ts, packaged VSIX families (list and Patterns card read shop)
Same-numbered labels could clash (web, web, web (2)) Same fix as #407 Valid Number until no shown label has it display-path.test.ts
New VSIX test left the dashboard on Patterns before a Timeline test Copilot thread Valid Test moved last VSIX suites pass
/mnt/c/Users/ and other mounted homes not recognized Copilot thread Valid Same forms as #407's file lists display-path.test.ts

Real data (read-only), strings with the signed-in handle, 244129b → 72ae3cf's fix: Patterns card names 9 → 0, aicoach context 6 → 0, credits 5 → 0, code 2 → 0, sidebar list 266 → 0, chat sessions list 31 → 0, Top workspaces chart 22 → 0, Context Health treemap 6 → 0. Left: quoted prompt text (anti-pattern messages, first messages, credit prompts) and Hot files paths (#407).

Gates at 72ae3cf: npm run check ✓ (4298 tests, lint 494 = main's 494, spellcheck 0, knip ✓), build ✓, package 1.79 MB ✓, check-size ✓ (1.86 MB). VSIX suites 1 + 5 + 9 at 781f6ec (later commit is display-path only).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The display-path helper returns alex for sessions named ~, causing the name-based Current filter to fall back to All because the open folder’s URI/root is not passed through.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread src/core/display-path.ts Resolved
… are named (review)

A window opened on another account's home (/mnt/c/Users/<x>, /home/<x>) has sessions named ~ but a window name <x>. The VS Code panel now names a single-folder window from its folder through the same helper; a multi-root workspace and the canvas host keep the window name.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 8 summary (head 04eedb8)

Item Verdict Fix Failing-first test
A window opened on another account's home (/mnt/c/Users/) is named while its sessions are ~, so Current falls back to All Valid The VS Code panel names a single-folder window from its folder through workspaceFolderName; multi-root workspaces and the canvas host keep the window-name fallback display-path.test.ts, panel.test.ts

Gates at 04eedb8: npm run check ✓ (4300 tests, lint 494 = main, spellcheck 0, knip ✓).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because workspace-name caches can retain and expose a user’s handle after sign-in and an extension restart.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

…view)

Workspace names drop the signed-in GitHub handles, so a cache written before signing in would keep a handle on screen after an extension restart. meta.json records the handles names were written without; a cache with other handles is re-parsed, like a version change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 9 summary (head 4b29951)

The round had no open issues; the overview asked for a closer look: 'workspace-name caches can retain and expose a user's handle after sign-in and an extension restart'.

Item Verdict Fix Failing-first test
A cache written before signing in (no handle known) keeps -… workspace names until its logs change Valid meta.json records the signed-in handles names were written without; a cache with other handles is re-parsed, like a version change. Order and case don't matter. cache-handles.test.ts

Gates at 4b29951: npm run check ✓ (4302 tests, lint 494 = main, spellcheck 0, knip ✓). Full e2e at 04eedb8: 259 passed, 7 skipped; VSIX suites at 04eedb8: 1 + 5 + 9 passing.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because stale account discovery can leave host and parser scrubbing inconsistent after sign-in changes, potentially exposing account handles and breaking workspace matching.

No open issues 🎉

Review effort: Balanced

localScrubContext cached the signed-in GitHub handles for the life of the process, so after signing in the extension host (Current filter, Top workspaces) and a new parse worker could disagree. It is read again when a sign-in file (Copilot config.json, gh hosts.yml) changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 10 summary (head 01f344e)

No open issues; the overview asked for a closer look: 'stale account discovery can leave host and parser scrubbing inconsistent after sign-in changes'.

Item Verdict Fix Failing-first test
localScrubContext cached the signed-in GitHub handles for the life of the process, so after signing in the extension host (Current filter, Top workspaces hover paths) and a new parse worker could use different handles Valid Read again when a sign-in file (Copilot config.json, gh hosts.yml) changes; the check is a few stat calls session-labels.test.ts

Gates at 01f344e: npm run check ✓ (4303 tests, lint 494 = main, spellcheck 0, knip ✓).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The panel and parser memory caches still lack handle validation, allowing stale names after sign-in and dashboard reopening; both need invalidation and a regression test.

1 open issue

Review effort: Balanced

Comment thread src/core/cache.ts Resolved
…nge (review)

The dashboard's kept parse (reopened without a reload) and the parser's memory cache now record the signed-in GitHub handles their workspace names were written under, like the disk cache; another key means a fresh parse. One key function, signedInHandlesKey, serves all three.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 11 summary (head 6f2566c)

Item Verdict Fix Failing-first test
The panel cache (dashboard reopened without a reload) and the parser's memory cache skip the signed-in handles check the disk cache has Valid All three caches record signedInHandlesKey(); a different key means a fresh parse panel.test.ts, cache-handles.test.ts

Gates at 6f2566c: npm run check ✓ (4305 tests, lint 494 = main, spellcheck 0, knip ✓).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed to evaluate a sign-in race during parsing that can associate stale names with a new handle and preserve them across multiple caches.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

…iew)

If the user signed in during a parse, names parsed before it kept the handle but the caches were saved under the new handles, so they counted as current. The parser, the worker's result and the panel take the signed-in handles key when the load starts and save the disk, memory and panel caches under it; panelCache.store takes { totals, handles }.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@san360

Copy link
Copy Markdown
Contributor Author

Copilot review round 12 summary (head c1da071)

No open issues; the overview asked for a closer look at 'a sign-in race during parsing that can associate stale names with a new handle'.

Item Verdict Fix Failing-first test
Signing in during a parse: names parsed before it keep the handle, but the caches were saved under the new key Valid (narrow) The parser, the worker's done message and the panel take the key when the load starts; the disk, memory and panel caches are saved under it, so the next load re-parses cache-handles.test.ts

This closes the sign-in/cache theme of rounds 9 to 12: the disk, memory and panel caches all carry the handles key, it is read again when a sign-in file changes, and it is the key from when the parse started.

Gates at c1da071: npm run check ✓ (4306 tests, lint 494 = main, spellcheck 0, knip ✓).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the privacy-safe workspace naming changes.

No open issues 🎉

Review effort: Balanced

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.

2 participants