-
Notifications
You must be signed in to change notification settings - Fork 482
refactor(gui): react-doctor cleanup for App, Logs, Subagents #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
43d3255
e664956
7dad03c
3c75294
c9ba752
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import type { KeyboardEvent } from "react"; | ||
|
|
||
| export type LogsTab = "logs" | "debug"; | ||
|
|
||
| export function readTabFromHash(): LogsTab { | ||
| return window.location.hash.replace(/^#\/?/, "") === "logs/debug" ? "debug" : "logs"; | ||
| } | ||
|
|
||
| export function selectLogsTab(next: LogsTab) { | ||
| window.location.hash = next === "debug" ? "logs/debug" : "logs"; | ||
| } | ||
|
|
||
| export function logsTabKeyDown(e: KeyboardEvent) { | ||
| if (e.key === "ArrowLeft" || e.key === "Home") { | ||
| e.preventDefault(); | ||
| selectLogsTab("logs"); | ||
| document.getElementById("logs-tab-logs")?.focus(); | ||
| } else if (e.key === "ArrowRight" || e.key === "End") { | ||
| e.preventDefault(); | ||
| selectLogsTab("debug"); | ||
| document.getElementById("logs-tab-debug")?.focus(); | ||
| } | ||
| } | ||
|
Comment on lines
+13
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win Cover the extracted keyboard contract with tests. Add focused coverage for ArrowLeft/ArrowRight/Home/End, unrelated keys, hash parsing, and focus targets. The PR notes that Logs smoke tests are still pending, and this helper now owns the tab-navigation behavior. 🤖 Prompt for AI Agents |
||
Uh oh!
There was an error while loading. Please reload this page.