Skip to content

Fix 9 dashboard bugs: menu flicker, sync, test gating, toast, ollama cloud, key persistence, modal close, GLM validate, combo multi-select#61

Merged
quangdang46 merged 2 commits into
mainfrom
devin/1779440641-fix-dashboard-bugs
May 22, 2026
Merged

Fix 9 dashboard bugs: menu flicker, sync, test gating, toast, ollama cloud, key persistence, modal close, GLM validate, combo multi-select#61
quangdang46 merged 2 commits into
mainfrom
devin/1779440641-fix-dashboard-bugs

Conversation

@quangdang46
Copy link
Copy Markdown
Owner

@quangdang46 quangdang46 commented May 22, 2026

Summary

Fixes 9 reported UX/correctness bugs across the dashboard and provider sync layer.

Bug 1 — Menu flicker on load. The sidebar collapsed/expanded width was decided client-side, so the first paint shipped a wide rail that snapped to narrow once useState rehydrated. Added an SSR-aware initial width (read from cookie) so the first paint matches the persisted state. Files: web/src/layouts/Layout.astro, web/src/shared/components/Sidebar.tsx, web/src/shared/components/layouts/DashboardLayout.tsx.

Bug 2 — Sync from 9router incomplete. The catalog file src/core/model/sources/9router.json was missing the Ollama Cloud *:cloud models (and other recent additions) that exist upstream at https://github.com/decolua/9router. Regenerated the source catalog with the missing models and propagated them through to src/core/model/provider_catalog.json. Sync logic itself was sound; the gap was the inputs.

Bug 3 — "Test all" clickable with zero providers. Both ProvidersPageClient and ConnectionsCard now disable the per-section "Test all" button when no provider connections exist for that provider/section.

Bug 4 — Toast styling out of place. Restyled the toast container to use the same surface tokens, border radii, and typography as the rest of the dashboard (web/src/shared/components/styles/global.css).

Bug 5 — Ollama needs cloud model suggestions. Added the new Ollama :cloud models (deepseek-v4-flash:cloud, deepseek-v4-pro:cloud, glm-5.1:cloud, kimi-k2.6:cloud, minimax-m2.7:cloud, qwen3.5:cloud) to both provider_catalog.json and 9router.json so the Ollama provider page surfaces them as suggestions.

Bug 6 — API key lost when reopening edit modal. The backend was returning provider connections with apiKey redacted, so the dashboard couldn't tell whether a key was already on file vs. blank. Added a hasApiKey boolean stamp in src/server/api/mod.rs (without ever returning the secret). EditConnectionModal now renders a masked "•••• on file" placeholder and a smart submit button: if a key is already saved and the user didn't type a new one, it tests the saved key instead of overwriting it with empty. The cleartext key is never sent back over the wire.

Bug 7 — Modal closes on outside click. Changed the default closeOnOverlay behavior in Modal.tsx to false. Sites that explicitly want overlay-close opt in; everywhere else, modals only close via Cancel / X / Escape.

Bug 8 — GLM/Kimi/MiniMax validation always invalid + ugly browser alerts. Root cause: the Anthropic-compatible providers were being validated against the default Anthropic endpoint, so a valid GLM key always failed. provider_validate.rs now falls back to provider-specific endpoints (api.z.ai, api.kimi.com, api.minimax.io, api.minimaxi.com) when no custom base URL is configured, and actually sends a small /messages payload so the auth round-trips. Also widened the model-test success check in providers.rs to accept Anthropic (content[]) and Gemini (candidates[]) shapes, not just OpenAI choices[]. On the UX side, replaced every confirm() / alert() in the providers, connections, endpoint, db-backups, provider-limits, pricing, and compatible-models surfaces with the in-app ConfirmModal + notification store, so the "delete model" flow opens a proper modal instead of the OS alert.

Bug 9 — Combo selection + leftover Profile page.

  • The combo model picker now supports multi-select: clicking a model toggles it into/out of the combo and the modal stays open until the operator is done (closeOnSelect={false}).
  • The ModelSelectModal highlights already-selected entries when reopened, so previous picks are visible.
  • The cramped border issue is gone now that the picker uses the standard Modal chrome with size="lg".
  • Deleted the unused /dashboard/profile page and its sidebar entry.

Review & Testing Checklist for Human

  • Bug 6 / Bug 8 GLM end-to-end — paste a real z.ai key into the GLM connection, save, reopen the modal (key should show masked "on file"), click Test → expect green pass; then click Test on a model row → expect green pass. Then delete the connection → expect the in-app red confirm modal, not the browser alert.
  • Bug 2 sync coverage — run "Sync from 9router" and confirm the Ollama Cloud models (deepseek-v4-flash:cloud, kimi-k2.6:cloud, glm-5.1:cloud, minimax-m2.7:cloud, qwen3.5:cloud, etc.) show up under /dashboard/providers/ollama suggestions.
  • Bug 9 combo multi-select — open /dashboard/combos, create a combo, pick 3 models in one go (modal stays open), reopen → the 3 should be highlighted.
  • Bug 1 menu flicker — hard-reload the dashboard with the sidebar collapsed; the first paint should already be narrow (no width snap).
  • Bug 7 outside-click — open any edit modal, click the dimmed overlay → modal should NOT close. Click the X / Cancel → it should.

Notes

  • astro build is green locally. tsc --noEmit still surfaces a number of pre-existing TS errors in BasicChatPageClient.tsx and cli-tools/* that are unrelated to this PR; none of the files this PR touches add new TS errors.
  • cargo check was not run on the VM (Rust toolchain not installed in this Devin environment) — relying on CI for the Rust side. The Rust changes are small and self-contained: an extra match for provider fallback URLs, two extra success-shape checks, and a hasApiKey boolean stamp on an existing JSON response.
  • The deleted /dashboard/profile page was unreferenced; nothing else linked to it.

…, ollama cloud models, key persistence, modal outside-click, validation, combo multi-select
@quangdang46 quangdang46 merged commit 1e167df into main May 22, 2026
5 checks passed
@quangdang46 quangdang46 deleted the devin/1779440641-fix-dashboard-bugs branch May 22, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant