-
Notifications
You must be signed in to change notification settings - Fork 382
feat(gui): Dashboard workspace view + drop Providers classic toggle #428
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
66a5b99
gui: add Dashboard workspace view (section rail + main pane)
Wibias 9da77c1
Merge branch 'dev' of https://github.com/lidge-jun/opencodex into cod…
Wibias 26cf5c1
fix(gui): dashboard workspace visual polish (rail header, sidecar gri…
Wibias 7ce5f34
fix(gui): uniform 16px vertical rhythm across dashboard overview boxes
Wibias d2bbad8
fix(gui): cap dashboard workspace tables with internal scroll + stick…
Wibias 7729325
gui: add global Workspace/Classic toggle to sidebar
Wibias bfdd97a
gui: drop per-tab dashboard toggle (sidebar owns it) + models summary…
Wibias f33de38
fix(gui): unify dashboard help popups as centered blurred modals
Wibias b4bf06b
fix(gui): let modal backdrop blur show through (lighter overlay tint)
Wibias 079503b
fix(gui): keep Select dropdown in viewport (flip up + right-align sha…
Wibias c463384
feat(gui): dashboard models as searchable per-provider accordion
Wibias a5bde42
fix(gui): fix rail row border clipping (outline -> inset shadow)
Wibias 3499f3d
fix(gui): port upstream dashboard health and guidance into workspace …
Wibias bca3842
fix(gui): keep dashboard hooks stable when connection errors
Wibias 769c9ff
merge(gui): sync dashboard workspace with upstream/dev
Wibias 255fb7e
fix(gui): drop Providers classic toggle and harden dashboard selects
Wibias e23ba72
merge(gui): sync dashboard workspace with upstream/dev
Wibias 174268c
fix(gui): address CodeRabbit and Codex review on workspace toggle
Wibias 2161fbc
fix(gui): remove unused writeProvidersViewPreference
Wibias 75e237c
fix(gui): finish PR #428 review — viewMode props, Select a11y, poll o…
Wibias 5ff127f
fix(gui): clear App/Select lint for viewMode deep-link and option ids
Wibias 527be82
merge(dev): sync gui-dashboard-workspace with upstream/dev
Wibias e691b76
fix(gui): replace Providers hash passively; make Select a combobox (#…
Wibias f8e6e8a
fix(gui): guard shadow-call parse failures and close Select review gaps
Wibias 9e66467
fix(gui): treat Classic/Workspace as preference, not history navigation
Wibias 051ee80
fix(gui): retarget Providers workspace subroute contract after route …
Wibias 421eb44
fix(gui): show Select keyboard focus and keep session viewMode withou…
Wibias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| /** Pure hash → page/viewMode resolution used by App route state. */ | ||
|
|
||
| import { normalizeHashPath, resolveProvidersHashChange } from "./hash-routing"; | ||
| import { providersHashForViewMode, type ViewMode } from "./view-mode"; | ||
|
|
||
| export type Page = | ||
| | "dashboard" | ||
| | "startup" | ||
| | "providers" | ||
| | "models" | ||
| | "combos" | ||
| | "subagents" | ||
| | "logs" | ||
| | "usage" | ||
| | "storage" | ||
| | "codex-auth" | ||
| | "api" | ||
| | "claude"; | ||
|
|
||
| export const VALID_PAGES = new Set<Page>([ | ||
| "dashboard", | ||
| "startup", | ||
| "providers", | ||
| "models", | ||
| "combos", | ||
| "subagents", | ||
| "logs", | ||
| "usage", | ||
| "storage", | ||
| "codex-auth", | ||
| "api", | ||
| "claude", | ||
| ]); | ||
|
|
||
| export function readPageFromHash(hash?: string): Page { | ||
| const raw = normalizeHashPath( | ||
| hash ?? (typeof window !== "undefined" ? window.location.hash : ""), | ||
| ); | ||
| // Sub-views use a "/" suffix (e.g. #providers/workspace); the first segment is the page id. | ||
| const pageId = raw.split("/")[0] as Page; | ||
| // Legacy: Debug used to be a standalone page; it now lives as a tab on Logs. | ||
| if (pageId === ("debug" as Page)) return "logs"; | ||
| return VALID_PAGES.has(pageId) ? pageId : "dashboard"; | ||
| } | ||
|
|
||
| export function hashBelongsToPage(rawHash: string, page: Page): boolean { | ||
| return rawHash === page | ||
| || (page === "providers" && rawHash === "providers/workspace") | ||
| || (page === "logs" && rawHash === "logs/debug"); | ||
| } | ||
|
|
||
| export function providersHashForPreferredMode(preferred: ViewMode = "classic"): string { | ||
| return providersHashForViewMode(preferred); | ||
| } | ||
|
|
||
| /** | ||
| * Result of applying an incoming hash against the canonical view preference. | ||
| * Callers must apply `page` and `viewMode` together (no deferred transitions). | ||
| */ | ||
| export type AppHashChangeAction = { | ||
| page: Page; | ||
| /** When non-null, set React viewMode in the same turn as `page`. */ | ||
| viewMode: ViewMode | null; | ||
| /** When non-null, persist to the canonical preference store. */ | ||
| persistViewMode: ViewMode | null; | ||
| /** When non-null, passively replace the current history entry (no push). */ | ||
| replaceTo: string | null; | ||
| }; | ||
|
|
||
| /** | ||
| * Resolve what App should do for the current location hash. | ||
| * Classic/Workspace is a persistent preference: bare `#providers` with a stored | ||
| * workspace preference is rewritten via replaceState, never pushed. | ||
| */ | ||
| export function resolveAppHashChange(rawHash: string, preferred: ViewMode): AppHashChangeAction { | ||
| const nextPage = readPageFromHash(rawHash); | ||
|
|
||
| if (rawHash === "debug" || rawHash.startsWith("debug/")) { | ||
| return { | ||
| page: "logs", | ||
| viewMode: null, | ||
| persistViewMode: null, | ||
| replaceTo: "logs/debug", | ||
| }; | ||
| } | ||
|
|
||
| if (!hashBelongsToPage(rawHash, nextPage)) { | ||
| return { | ||
| page: nextPage === "providers" ? "providers" : nextPage, | ||
| viewMode: nextPage === "providers" ? preferred : null, | ||
| persistViewMode: null, | ||
| replaceTo: nextPage === "providers" ? providersHashForPreferredMode(preferred) : nextPage, | ||
| }; | ||
| } | ||
|
|
||
| if (nextPage === "providers") { | ||
| const resolved = resolveProvidersHashChange(rawHash, preferred); | ||
| if (resolved.replaceTo) { | ||
| return { | ||
| page: "providers", | ||
| viewMode: resolved.viewMode, | ||
| persistViewMode: resolved.viewMode, | ||
| replaceTo: resolved.replaceTo, | ||
| }; | ||
| } | ||
| return { | ||
| page: "providers", | ||
| viewMode: resolved.viewMode, | ||
| persistViewMode: resolved.viewMode, | ||
| replaceTo: null, | ||
| }; | ||
| } | ||
|
|
||
| return { | ||
| page: nextPage, | ||
| viewMode: null, | ||
| persistViewMode: null, | ||
| replaceTo: null, | ||
| }; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new sidebar control changes persistent behavior across Dashboard and Providers and removes the former Providers-local toggle, but none of the
docs-siteweb-dashboard guides explains where the control moved or how Classic and Workspace preferences behave. Update the English dashboard guide and keep its translated counterparts consistent so users can discover and understand the replacement control.AGENTS.md reference: AGENTS.md:L78-L79
Useful? React with 👍 / 👎.