mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
fix: apply the review items for #685 at merge
palette agent switch: aria-hidden on .command-palette-agent, arrows lose role="button" and aria-label (no nested buttons in the row) i18n: zh-CN entry for the "Agent for the new session (Left/Right to change)" tooltip docs: Keyboard-Shortcuts Ctrl+K row says Left/Right change the agent on the New session row test: pin the aria-hidden switch and the zh-CN tooltip entry in command-palette-ui.test.ts Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c6a5995ac6
commit
d16172c4b8
4 files changed
+24
-6
No files matched your search
@@ -387,6 +387,20 @@ describe('Command-K new-session agent picker', () => {
|
||||
expect(elements.commandPaletteList.innerHTML).toContain('run-mode-dot opencode');
|
||||
});
|
||||
|
||||
it('keeps the switch out of the row button accessible name and gives its tooltip a zh-CN entry', () => {
|
||||
const { app, elements } = loadAgentPalette();
|
||||
app.openCommandPalette();
|
||||
const html = elements.commandPaletteList.innerHTML;
|
||||
const title = 'Agent for the new session (Left/Right to change)';
|
||||
|
||||
// No nested buttons inside the row's <button>: the subtitle names the agent.
|
||||
expect(html).toContain(`class="command-palette-agent" aria-hidden="true" title="${title}"`);
|
||||
expect(html).not.toContain('role="button"');
|
||||
expect(html).not.toContain('aria-label=');
|
||||
const i18n = readFileSync(resolve(import.meta.dirname, '../src/web/public/i18n.js'), 'utf8');
|
||||
expect(i18n.split(`'${title}':`).length - 1).toBe(1);
|
||||
});
|
||||
|
||||
it('falls back to the first offered agent when the Run button mode is not offered', () => {
|
||||
const { app } = loadAgentPalette();
|
||||
app._runMode = 'codex'; // not installed
|
||||
|
||||
Reference in new issue
Block a user