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 3 commits into
Conversation
| """ | ||
| 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: |
8f51bf9 to
727d702
Compare
|
I believe those two types of issues from the security bot are actually false positives as we deal with local tool here:
|
|
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. |
631d6ad to
367d7ac
Compare
| candidate = os.path.realpath(os.path.join(root_real, path)) | ||
| if candidate != root_real and not candidate.startswith(root_real + os.sep): | ||
| raise ValueError(f"path escapes project root: {path!r}") | ||
| if not os.path.exists(candidate): |
|
Hi @paul-basanets , I appreciate that you continue improving this. We have not forgotten about the overhaul of the dashboard, just that other things are more urgent. Just FYI, we will definitely get back to you about this. |
|
@MischaPanch , no problem, thank you. To be honest i do it for myself and couple of other guys :) |
c3a06e9 to
d9798c7
Compare
ee32c5e to
ebe7646
Compare
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. - 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>
A tool call exceeding the tool timeout is cancelled and reported to the client as a failure, but its thread keeps running. Nothing was recorded at the point of the timeout, and the task's finally block later recorded the same call as a success with the full over-timeout duration, so the dashboard timeline showed a successful call for a request the client saw fail (or nothing at all when the tool never finished). Record the call at most once, via a lock-guarded recorder shared by the waiter and the task: whichever completes first wins, so analytics holds exactly one record and it matches what the client observed. The lock also keeps a slow-then-completing call from being counted twice in the aggregate stats. TaskInfo.get_error_message() returned None for cancelled futures, leaving the queued-executions panel blank; it now reports the cancellation without claiming a specific cause, since a user-initiated cancel from the dashboard reaches the same state. Note that _log_tool_application reports frame.f_locals, which includes closure variables of apply_ex.task(); the apply-kwargs construction has to stay inside task() or the tool's parameters silently vanish from the log, and the new recorder closure is excluded explicitly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Version.is_at_least/is_at_most indexed self.components directly, raising IndexError when the version had fewer components than the one it was compared against. All three callers pass externally sourced version strings - PyPI's latest release, `dotnet --version` output and JetBrains plugin metadata - so none of them can guarantee the documented precondition. The dashboard's newer-version check hit this on every construction in the tests, where the dummy agent reports "test-version": _get_version_components stops at the first non-numeric character, yielding no components at all and an IndexError logged from the background thread. Treat missing components as 0, so "1.6" compares as "1.6.0" and an unparseable version compares as lowest rather than raising. is_equal already handled short component lists via slicing and is left alone. Also stop the dashboard tests from depending on network access: constructing SerenaDashboardAPI spawns background threads querying GitHub for news and PyPI for the version check, so disable both via an autouse fixture. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
d9798c7 to
080c77d
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)