feat: [ENG-2167] cross-platform path handling and richer VC error con…#491
feat: [ENG-2167] cross-platform path handling and richer VC error con…#491ncnthien merged 3 commits intoproj/local-web-uifrom
Conversation
…text Project name and display path now recognise backslash-separated Windows paths alongside macOS and Linux home directories, each with a unit-tested suite covering absolute paths, trailing separators, UNC shares, and degenerate inputs. The shared formatError helper accepts an optional ErrorContext so overrides can produce tailored copy — ERR_VC_USER_NOT_CONFIGURED now embeds the project path and tells the user exactly where to run brv vc config. Changes panel threads the selected project through to the three commit-related error sites.
|
Claude finished @ncnthien's task in 3m 20s —— View job PR Review — feat: [ENG-2167] cross-platform path handling and richer VC error contextScore: 4.5 / 5 SummaryA well-scoped, clean PR that improves two utility functions ( What's good
Issues
No issues found in
|
Drop the redundant length check in getProjectName in favour of a straight falsy-fallback, swap undefined fallback arguments in the error-messages tests for a named string so intent is obvious, and add a UNC-share test to pin displayPath's "unchanged when no drive letter" contract.
|
Claude finished @ncnthien's task in 2m 13s —— View job PR Review — feat: [ENG-2167] cross-platform path handling and richer VC error contextScore: 4.7 / 5 What this update addressedThe
Still open
No new issues
SummaryA solid, focused PR. The nit-fixing commit shows responsiveness to review feedback. The two remaining open items are both cosmetic/preventive — neither blocks merge.
|
|
Claude finished @ncnthien's task in 2m 18s —— View job PR Review — feat: [ENG-2167] cross-platform path handling and richer VC error contextScore: 4.8 / 5 What this sync addressedThe latest push is a merge-base update ( Closing the regex escaping discussionThe previous two review passes flagged mixed escaping in
The current pattern is correct as written. The prior nit was based on a misunderstanding of where Correctness check on
|
| Severity | Location | Issue |
|---|---|---|
| suggestion | changes-panel.tsx:34–40 |
runAction deliberately omits ErrorContext because stage/unstage operations cannot raise ERR_VC_USER_NOT_CONFIGURED. A one-line comment would prevent a future contributor from adding context "for consistency". Cannot post this as an inline comment since the line isn't in the diff. |
No new issues in this sync
- Correctness: All three commit-path error sites (
doCommit,continueMerge,handleStageAllAndCommit) correctly thread{projectPath: selectedProject}. Push/pull/abort-merge remain context-free as intended. - Type safety:
selectedProject: stringis always astring; the falsy-check onprojectPathin the override handles the initial''value correctly. - Security: Regex is compiled once at module load; no user-controlled pattern construction.
- Backward compatibility:
formatErrorsignature change is fully additive; all existing callers unaffected. - TDD compliance: All new logic paths have explicit test assertions. Degenerate inputs (
'','/','\\','///'), UNC shares, and context-aware overrides are each independently verified.
Summary
A clean, focused PR with thorough test coverage and correct cross-platform handling. All blocking items from previous reviews are resolved. The one remaining item is a cosmetic documentation suggestion. The regex escaping is correct and lint-compliant — the previous nit was invalid.
- Gather context and understand the request
- Read changed files and diff
- Review correctness and logic
- Review test coverage and TDD compliance
- Review code quality and standards
- Post inline comments
- Post final review summary
…text
Project name and display path now recognise backslash-separated Windows paths alongside macOS and Linux home directories, each with a unit-tested suite covering absolute paths, trailing separators, UNC shares, and degenerate inputs. The shared formatError helper accepts an optional ErrorContext so overrides can produce tailored copy — ERR_VC_USER_NOT_CONFIGURED now embeds the project path and tells the user exactly where to run brv vc config. Changes panel threads the selected project through to the three commit-related error sites.
Summary
Type of change
Scope (select all touched areas)
Linked issues
Root cause (bug fixes only, otherwise write
N/A)Test plan
User-visible changes
List user-visible changes (including defaults, config, or CLI output).
If none, write
None.Evidence
Attach at least one:
Checklist
npm test)npm run lint)npm run typecheck)npm run build)mainRisks and mitigations
List real risks for this PR. If none, write
None.