feat: Dashboard v2: Svelte rewrite + new Code, Stats, and Timeline views#1526
feat: Dashboard v2: Svelte rewrite + new Code, Stats, and Timeline views#1526paul-basanets wants to merge 8 commits into
Conversation
Replace the legacy jQuery dashboard with a Svelte 5 + TypeScript app. - New Vite-based build pipeline + CI; remove the legacy jQuery dashboard. - Banners, "What's New", and config-modal wiring; restore legacy visual parity. - Shared modal-action / Confirm primitives, token-driven styles, a11y and a header menu. - Test scaffolding (shared fetch/fixture helpers) and broadened store/component coverage. - Single-pass highlightTools and escapeHtml hardening. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bug fixes and minor improvements on top of the Svelte rewrite. - Swap frappe-charts for Chart.js (+ datalabels); render pies and a dual-axis token bar via dedicated spec builders; in-place theme/data updates. - F1: surface config/memory editor load errors and block Save until loaded. - F2: logs viewer tails the newest line on first load. - F3: mark the active view tab with aria-current=page. - F4: add a title heading to the Create Memory modal. - Stats polish: inline KPI strip, pie/bar tuning, card-style toolbar, icon-only theme/shutdown buttons, thousands-separated totals. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cy branch Port the legacy-branch feature set and its follow-on changes. - analytics: ToolCallRecord ring buffer, Entry timing/error/last_called_at fields, 8KB truncation helper, cursor-based reads. - Instrument agent tool dispatch (timing + error capture) and task-executor TaskInfo timing with a race fix around future resolution. - Backend endpoints: timeline, totals, queued-exec timing; /code/* routes (list_dir, file_symbols, workspace_symbol_search, diagnostics_summary). - Frontend: Timeline, SummaryCards, FilterDropdown, Stats charts (sort selector, duration, rate, drilldown), and the Code tab (store, FileTree, Symbols, Search). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-on feature work building on the Code tab. - Code tab redesign with a lucide icon system (Icon wrapper plus icons across FileTree, Timeline, shell, logs, modals and drilldown). - symbolTree utilities (KIND_META, countByKind, filterTree, flattenForDisplay, symbolKey) and a rebuilt FileSymbols (breadcrumb, filter, copy). - Tri-state theme switcher, drilldown redesign, 2-col CodePage with Diagnostics as a 3rd middle pane, severity chips and slow-warning. - Scoped file/directory diagnostics: scope selector, per-row Run action, scope-aware text, pinned explicit scope. - Code-tab file-icon mapping module, type icons, indent guides and a how-it-works explainer popover (reusable Popover primitive). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| if os.path.isabs(path): | ||
| raise ValueError(f"absolute path not allowed: {path!r}") | ||
| root_real = Path(project_root).resolve() | ||
| candidate = (root_real / path).resolve() |
| candidate.relative_to(root_real) | ||
| except ValueError as e: | ||
| raise ValueError(f"path escapes project root: {path!r}") from e | ||
| if not candidate.exists(): |
| """ | ||
| candidate_paths: list[str] = [] | ||
| truncated = False | ||
| for dirpath, dirnames, filenames in os.walk(walk_root, followlinks=False): |
| return _err(400, str(e)) | ||
| except FileNotFoundError: | ||
| return _err(404, "directory not found") | ||
| if not os.path.isdir(resolved): |
|
|
||
| entries: list[_DirEntry] = [] | ||
| try: | ||
| with os.scandir(resolved) as it: |
| try: | ||
| doc_syms = ls.request_document_symbols(rel) | ||
| except TimeoutError as e: | ||
| return _err(504, str(e), "ls_timeout") |
| return _err(504, str(e), "ls_timeout") | ||
| except Exception as e: | ||
| log.error("LSP document symbols failed for %s: %s", rel, e, exc_info=e) | ||
| return _err(502, str(e), "ls_error") |
| try: | ||
| raw = ls.request_workspace_symbol(q) # singular — confirmed in solidlsp/ls.py | ||
| except TimeoutError as e: | ||
| return _err(504, str(e), "ls_timeout") |
| return _err(504, str(e), "ls_timeout") | ||
| except Exception as e: | ||
| log.error("LSP workspace symbol failed for %r: %s", q, e, exc_info=e) | ||
| return _err(502, str(e), "ls_error") |
| try: | ||
| resolved = resolve_project_path(root, path) | ||
| except ValueError as e: | ||
| return _err(400, str(e)) |
bf08eee to
8f51bf9
Compare
Final correctness and quality pass. - Route diagnostics per-file to the correct language server. - Functional + a11y bug sweep across all tabs. - Resolve poe type-check (mypy) errors. - Enforce Svelte 5 patterns in CLAUDE.md and add a Serena memory. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8f51bf9 to
727d702
Compare
The svelte-language-server's pull-diagnostics handler runs the Svelte parser on plain .ts/.js files, yielding spurious js_parse_error / expected_token diagnostics instead of real TypeScript errors. This broke test_diagnostics_in_typescript_file. request_text_document_diagnostics was the only TS-relevant operation not already delegated to the svelte-plugin-aware companion typescript-language- server (definition/references/rename already are). Add an override that routes .ts/.js files to the companion, falling back to the svelte LS for .svelte files or when the companion is unavailable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
I believe those two types of issues from the security bot are actually false positives as we deal with local tool here:
|
os.path.relpath returns backslash-separated paths on Windows, which broke the /code/* endpoints there: the relative path is used as the language-server lookup key and as the returned f["path"], so "pkg\inside.py" failed to match the posix-keyed diagnostics map and the test's "pkg/inside.py" assertion. Normalize all four relpath sites with .replace(os.sep, "/") (a no-op on posix), matching the existing repo idiom (file_system.py, memory_manager, clojure_lsp): - diagnostics_summary dir/project candidate paths - diagnostics_summary file-scope rel0 - file_symbols rel (was mis-routing the LS on Windows) - list_dir rel (defensive; should_ignore already normalizes) Fixes test_diagnostics_summary_directory_scope_limits_to_subtree on Windows CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The biggest issue with this is that it is against our contribution guidelines. Please read them. If we had wanted the dashboard to be implemented with Svelte, we would have done so. |
|
@opcode81 Anyway it's up to you, fell free to close the PR if you find it irrelevant. |
|
It is not primarily about the new features, some of which we think are useful; it is about the switch to Svelte. We greatly appreciate the work you have put into trying to improve Serena, but it is important that changes this large (and especially changes to the tech stack) be discussed in an issue prior to implementation - in order to produce a PR that aligns with the goals of the project and avoid unnecessary work. Please be sure to read our contribution guidelines. We will further discuss this internally and get back to you. |
_workspace_match built the returned match path with str(Path(file_path).relative_to(root)), which yields backslash separators on Windows. The existing test only asserts the response shape, not the separator, so Windows CI didn't catch it. Normalize with .replace(os.sep, "/"), matching the sibling /code/* fixes. No-op on posix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3b3dce9 to
5450b3b
Compare
Dashboard v2: Svelte rewrite + new Code, Stats, and Timeline views
A full rewrite of the Serena dashboard with a refreshed look, three new top-level
views, and a much richer picture of what the agent is doing in real time.
What's new
Modern dashboard
A rewritten from legacy single-page app with a consistent visual language.
Live activity Timeline
A scrolling timeline of recent tool calls and queued executions, with per-row
duration, status, and error details, plus filtering and summary cards
("calls today", "active tools", "error rate", etc.) at the top of the page.
Stats view
Interactive charts of tool usage: sortable bar charts, duration and call-rate
views, a dual-axis token/call chart, and a drill-down panel for any single
tool showing its full call history, timing distribution, and error breakdown.
Code view
A new file-explorer experience powered by the language servers Serena already
runs:
the correct language server, with a "how it works" explainer.
Better internals (user-visible)
feeds the Timeline, Stats, and drill-down views.
while still in progress.
This PR consists actually from 2 parts: rewrite of the dashboard to Svelte app so it's easier maintainable and extendable and couple of new features (Code tab, Stats updates, UI updates)