Skip to content

feat: database detail side bar - #872

Draft
lukecotter wants to merge 6 commits into
certinia:mainfrom
lukecotter:feat-db-side-panel
Draft

feat: database detail side bar#872
lukecotter wants to merge 6 commits into
certinia:mainfrom
lukecotter:feat-db-side-panel

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Fleshes out the Database tab detail side bar so a selected SOQL/DML/SOSL statement can be inspected in place — its vitals, the call stack that reached it, a call tree scoped to it, and (for SOQL) optimization tips — without leaving the Database tab.

🛠️ Changes made

  • Dockable side bar — dock left / right / bottom, resize, and a single toggle above the grids. Opens on the first row selection, then stays as you leave it (a closed panel no longer re-opens on selection).
  • Vitals — compact per-statement readout; units now follow the value (e.g. 12.34 ms).
  • Call stack — sortable Frame / Total / Self table with % bars; keyboard row navigation; clicking a frame selects it (no longer jumps to the Call Tree tab).
  • Call tree (new) — the statement scoped within its execution (ancestor path + subtree, totals attributed to the selection), switchable Time Order / Aggregated / Bottom-Up (Chrome-DevTools style) via a new shared <view-mode-switch> component reused by the Call Tree tab; clicking a row expands/collapses it; keyboard row navigation.
  • Settings — app-wide lana.sidePanel.position / lana.sidePanel.size; the Database column-view choices move to private globalState.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

🔗 Related Issues

closes #113
related #373

✅ Tests added?

  • 👍 yes

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site

Anything else we need to know? [optional]

  • Follow-ups (not in this PR): promote the side bar app-wide across all tabs; SOSL row → panel selection parity; keyboard navigation of grouped-table headers.

Docked detail panel (DockLayout > DetailDock > PaneView) for the Database tab showing Vitals, Call stack, and SOQL issues for the selected row. Selection-driven (mouse + keyboard), resizable/repositionable dock with persisted position/size. Includes CodeBlock, panelTokens spacing scale, and group-header ellipsis + callstack sizing fixes.
Dockable side bar (left/right/bottom, size persisted) with a single toggle
above the grids; opens on the first row selection then stays as the user
leaves it.

- Vitals: units after the value (e.g. `12.34 ms`).
- Call stack: sortable Frame/Total/Self table with % bars; keyboard row nav;
  click selects (no longer jumps to the Call Tree tab).
- Call tree: new section scoped to the selected statement — ancestor path +
  subtree with totals attributed to the selection — switchable Time Order /
  Aggregated / Bottom-Up via a shared <view-mode-switch>; click toggles the
  row; keyboard row nav.
- Settings: app-wide lana.sidePanel.position/size; database column views move
  to private globalState.
- Docs + CHANGELOG.
@lukecotter
lukecotter force-pushed the feat-db-side-panel branch from 85577af to 3c6fbea Compare July 25, 2026 09:15
- SOSL rows now open the shared panel (Vitals/Call stack/Call tree) via the same
rowSelectionChanged→db-row-select model as DML/SOQL, replacing the old inline detail row
- add a Call tree section scoped to the selection with Time Order/Aggregated/Bottom-Up modes; mount each
Tabulator in an inner static-class grid so Lit re-renders don't strip its classes (fixes header columns
stacking on mode switch)
- persist section collapse state as private sidePanel.collapsed globalState; relayout Vitals to a subgrid
that stacks label/value when the dock is narrow instead of scrolling
- extract shared createDurationBarColumn/waitForNextFrame into TableShared, cache the scoped tree per
selection, and guard _showActive against building into a disconnected pane (Tabulator leak)
Lifts the detail panel out of the Database tab so it can crosscut all tabs; Database behaviour is
unchanged (parity).

- add <detail-sidebar> at the app root that owns the dock + panel state/persistence; <vscode-tabs> slots
into it via a forwarded main slot so the bar sits beside every tab
- route selection over the typed EventBus (detail:select / detail:toggle); the DML/SOQL/SOSL grids emit
it, replacing the db-row-select document event
- strip DatabaseView of dock/panel ownership, keeping only its grids, metrics, find, and cross-grid
deselect
- move the side-bar toggle to the NavBar, separated from notifications/help by a divider
- emit a typed detail:select from Call Tree (all 3 modes), Analysis and Timeline selection, so the app-level side bar follows whichever tab is active; aggregate rows scope to every occurrence of the frame rather than one representative
- create DatabaseAccess when the log is parsed instead of when the Database tab loads, since the event lookup now backs the side bar on all tabs
- merge db-vitals into a single event-vitals: code block with copy at the top, then each governor metric once as `used / limit (pct, self n)` with bracketed qualifiers, grouped SOQL query plan, 3dp times, zero-valued fields omitted
- coalesce side bar rebuilds to one per frame, build only the visible call-tree view, and cap materialised nodes so a broad aggregate cannot block the main thread
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.

feat: interactive calltree on timeline

1 participant