[LKPR-141] feat: dashboard v2 visual fidelity - #344
Merged
Merged
Conversation
ScorePill now follows spec §2.3 (tinted bg + saturated text, rounded-rect) instead of a solid fill; DataTable cell snippets receive the row so columns can render components. Memories columns render the score pill, namespace dot, confidence as a percentage, and right-align the numeric columns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- PageShell: drop the body <h1>/subtitle (mockups show the page name only in the breadcrumb; pages that need a heading render their own). - NavRail: solid purple shield brand tile (was the ring logo.svg), add the border-top divider above Settings, health dot 7px. - AppShell: page-body max-width 1280px + 24/32/40 padding. - app.css: correct task-badge hues (+ `other`), new relation taxonomy tokens (neutral grey pill + relation-colored text/edges), 5-step blue heatmap ramp, scrim rgba(24,24,37,.34). - primitives: relation taxonomy covers the real backend vocabulary + design set; relationColor() exposes edge colors. RelationPill now renders grey-bg/colored-text. - icons: Review nav icon is the inbox tray, not a speech bubble. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Parallel rebuild of every page against the design visuals/mockups: - Home: greeting header, Knowledge Health card (status ring + freshness/ confidence/dup-risk bars + 2x2 substats), action stat-tiles, activity feed. - Query: weighted signal-contribution bars, corrected colors, full-bleed composer band, big combined-score badge, "why it ranked" rows. - Links: new SVG GraphView + Graph/Links toggle, relation legend, corrected table + sorting + client-side pagination (fixes tall-render timeout). - Review: segmented Suggestions/Stale tabs, relation pills, per-row accept/ reject, row->drawer. - Sessions: two-row cards, hollow timeline nodes, task badges, drawer pills. - Metrics: single heading, blue aggregate heatmap, per-tool tinted heatmaps, redesigned volume card, dark tooltip. - Settings: 6-card layout + sticky sub-nav, weight bars + live sum badge, ToggleSwitches, global save bar, export/import tiles. - app.css: define border-subtle / surface-raised / text-secondary tokens. Features degrade gracefully pending backend (stale endpoint, suggestion relation, session duration/memory_count). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adapt home/links/review/settings specs to the new DOM (StatTile links, link-row selectors, segmented Review tabs, regrouped Settings sections + single save bar). Functional suite green at 50/50; no product changes needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1. Memories sort-by-links now works — sort by a correlated link-count subquery in search_memory_rows (link count isn't a real column, so it previously fell back to updated_at). 2. Memory detail drawer view mode redesigned to match the mockup: READ-ONLY badge, grey conf/uses/links/updated chips, and labeled boxed Namespace/Score/ Description/Content fields (was an inline meta row + plain text). 3. Show-deleted control is now a bordered .tbtn button that toggles an active state (was a toggle switch) — matches Memories.dc.html. 4. Query score bars are normalized against the actual result set (top result fills the list track; the strongest signal fills the inspector bar) instead of a fixed denominator that left every bar looking empty. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
isNumericColumn only matched an exact key list, so `links_count` (and `usage_count`/`updated_at`) were treated as text — clicking the Links header sorted ascending, surfacing zero-link rows and reading as "sort not working". Add a `*_count` / `*_at` suffix heuristic so these columns default to descending (most-linked first). Backend sort was already correct. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…p counts - Memory drawer edit mode now matches the mockup: title becomes a bordered input in the header, a Namespace dropdown + Score row (replacing Source type), and a clean "Delete this memory" section (label/desc left, Soft-delete + Delete buttons right) — no red box. - Delete / soft-delete route through the styled ConfirmDialog modal instead of the browser's native confirm() (which "didn't show"). - Filter-chip counts render as muted text (mockup .chip .n), not filled dark badges; active-chip colors aligned to the mockup tokens. - Namespace is now an editable field (added to MemoryUpdate + repository whitelist) so the drawer dropdown persists. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fresh, align - RelationshipDrawer is now vertical (Source card → ↓ + relation → Target card) with Source/Target role labels, matching the mockup (was side-by-side). - Clicking a memory card in the relationship drawer redirects to /memories?open=<id> and opens that memory's drawer. Bridged id→lore_id on the Links/Review pages (the API serializes `id`, so lore_id was undefined and the nav hit ?open=undefined). - Query result bars are relative to a perfect 1.0 (a 0.16 result fills ~16%), not to the top result; the bar fills to the combined score. - Memories pagination matches the mockup: "1–50 of N" left, chevron buttons + "Page X of Y" right, comma-formatted, no page-size dropdown. - Added the refresh icon button to the memories toolbar. - Fixed the search bar / table alignment (removed the toolbar/chip horizontal inset so they're flush with the table card). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Coverage report
The report is also available in the GitHub Actions job summary. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR (LKPR-141) rebuilds the seven dashboard-v2 (Svelte 5) pages to match the approved mockups, resolves a batch of visual/functional review TODOs, and enriches the /api/health endpoint with portfolio-level aggregates and composite sub-scores to feed the new home dashboard. It fits into the dashboard-v2 effort layered on the existing 6-layer backend (routes → handler → processor → domain service → repository), touching only presentation/API-shaping code plus one new read-only aggregate query.
Changes:
- Rebuild all 7 dashboard-v2 pages (home/memories/links/query/metrics/sessions + review/settings strings), add graph view, delete-confirm dialogs, filter-chip counts, and fix default descending sort for
*_count/*_atcolumns. - Enrich
get_healthwithcomposite/status/freshness/confidence/dup_riskand aggregate fields backed by a newMemoryStore.get_aggregate_stats(); addlinks_countsort via correlated subquery and allow editingnamespace. - Update E2E specs to match the rebuilt UI selectors/tabs.
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/lorekeeper/dashboard/handler.py |
Enriches get_health aggregate; verified variables defined and math bounded. |
src/lorekeeper/domains/memory/repository.py |
New get_aggregate_stats, links_count sort subquery (injection-safe), namespace added to update allowlist. |
src/lorekeeper/dashboard/routes/memories.py |
Adds namespace to MemoryUpdate; edit path wired end-to-end. |
src/dashboard_v2/src/routes/query/+page.svelte |
Query page rewrite; double-applies weights to already-weighted signal scores and has a dangling comment. |
src/dashboard_v2/src/routes/sessions/+page.svelte |
Timeline card/toolbar restyle; search glyph anchored inside input. |
src/dashboard_v2/src/lib/sort.ts |
_count/_at suffix heuristic; used only for default direction, so timestamp sort is unaffected. |
src/dashboard_v2/tests/*.spec.ts |
E2E selector/tab updates for rebuilt UI (.stat-tile, .toast-pill, tr.link-row, new tab names). |
Comments suppressed due to low confidence (1)
src/dashboard_v2/src/routes/query/+page.svelte:88
- The debug endpoint already returns per-signal weighted contributions:
query.pymapsresult.w_semantic/w_keyword/w_memory/w_usage(computed inranking.pyassettings.w_* * raw * decay, and documented to sum ≈combined_score) onto thesemantic_score/keyword_score/memory_score/usage_scorefields. Multiplying them again byWEIGHTShere double-applies the weights, so the per-signal split rendered bystackSeg/barWidthno longer reflects each signal's true share of the combined score. Use the fields directly instead, and drop the now-unusedWEIGHTSconstant and its comment block (lines 20–29). This also removes the separate problem that the hardcodedWEIGHTS(keyword 0.25, memory 0.2) don't match the backend defaults (keyword 0.30, memory 0.15) and can't track the env-configurableLORE_W_*overrides.
Jessinra
approved these changes
Jul 28, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Rebuilds all 7 Dashboard V2 pages to match the approved design mockups and resolves all visual/functional review TODO items.
Changes
Design & Visual
Functional Fixes
*_count/*_atcolumns to descending sort#drawer-titleid on edit-mode title input (E2E)API
/api/healthaggregate for home dashboardTests
Checklist