fix(files): name the worktree switch button before a listing fills it in

The button sat empty in the page while its strip was hidden, which the
mobile accessibility suite counts as a button with no name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-06 09:32:00 +01:00
1 parent 124d576398
commit 61e3410e83
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -217,6 +217,10 @@ describe('Files panel in a git worktree', () => {
expect(elements.fileBrowserRoot.hidden).toBe(true);
});
it('gives the switch button a name before the first listing fills it in', () => {
expect(indexHtml).toMatch(/id="fileBrowserRootSwitch"[^>]*>Session folder<\/button>/);
});
it('is wired up in the page', () => {
expect(appJs).toContain('this._followFileBrowserWorktree?.(session)');
expect(indexHtml).toContain('id="fileBrowserRoot" hidden');