fix(web): compact recent path labels - #1757
Open
techotaku39 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Findings
- [Minor] Recent-path buttons lose their unique accessible name; see the inline finding.
Questions
- None.
Summary
- Review mode: initial
- One minor accessibility regression found. No other correctness, security, data-loss, performance, or maintainability issues found in the modified lines.
Testing
- Not run (automation); PR code was not executed. GitHub checks were pending at review time.
HAPI Bot
| title={path} | ||
| > | ||
| {path} | ||
| {getPathDisplayName(path)} |
There was a problem hiding this comment.
[MINOR] Keep the full path as the accessible name
The compact text becomes the button's accessible name; title is only a fallback when the element has no other name. As a result, paths such as /work/client/Agent/Hapi and /archive/Agent/Hapi are both announced as Agent/Hapi, so assistive-technology users cannot tell which directory will be selected. Keep the compact visible text, but expose the full path semantically and update the role query in the regression test.
Suggested fix:
<button
// ...
title={path}
aria-label={path}
>
{getPathDisplayName(path)}
</button>There was a problem hiding this comment.
Findings
- None.
Questions
- None.
Summary
- Review mode: follow-up after new commits
- No correctness, security, regression, data-loss, performance, or maintainability issues found in the latest modified lines. The new commit resolves the prior accessible-name finding by preserving the full path in
aria-label; the complete latest diff was re-reviewed. Residual risk: GitHub test and integration checks were still pending at review time.
Testing
- Not run (automation); PR code was not executed. Added tests cover POSIX and Windows compact formatting plus full-path click/accessibility preservation. GitHub
testandintegrationchecks pending.
HAPI Bot
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Validation
bun run --cwd web test src/utils/path.test.ts src/components/NewSession/DirectorySection.test.tsx src/components/SessionList.test.ts— 55 tests passed.bun typecheck— passed.pwsh -NoProfile -File scripts/Invoke-HapiTaskPlaywright.ps1 -Name investigate-recent-path-display -Suite Root terminal-wrap-fidelity.spec.ts— 2 tests passed.Agent/Hapi, retained the full path in the button title, and restored the full path to the directory input after clicking.bun run build— passed.Related Issues
None.
AI Disclosure
Implementation and tests were assisted by OpenAI Codex (GPT-5.6).