Repository navigation
fix(web): clicking a file in the Files tree keeps focus on that row - #28521
Approved
- Eligibility
- Correctness
Note
More information about how approvability works can be found in our Help Center.
Details
Eligibility
Preserves focus on the clicked file row rather than restoring a previously focused row. The change is limited to browser focus handling and leaves explicit focus targets and F6 navigation unchanged.
Additional Thinking
Your Custom Policy
Default approvability criteria apply. This is a focus-restoration correction, not a change to product defaults, and it adds no diagnostic-suppression directives; neither additional human-review condition is triggered.
Code
Adds an early return when a selector-free workspace focus request already has focus inside the panel surface. This preserves the clicked file row instead of restoring an older row; explicit selector requests, empty-surface waiting, and F6 navigation remain unchanged. Effects are local to browser focus, not persistent data or external systems.
Review Context
Author is shkumbinhasani; no ownership requirement was supplied. The supplied review context contains no unresolved comments or correctness findings. The PR description reports focused browser tests and changed-file checks passing; no independent CI results were supplied.
Verdict
The change is understood and narrowly preserves existing user focus within the requested surface. It introduces no material data, operational, or product-policy exposure requiring human judgment.
Notes:
No code owners found in target merge base ce48e45
Agent Credits: 30 credits
Approvability runs at a flat rate of 30 credits whenever the agent is asked for a verdict.