Skip to content

refactor(log-viewer): deliver the log to every view through context only - #945

Merged
lcottercertinia merged 3 commits into
certinia:mainfrom
lukecotter:refactor-context-log-delivery
Aug 19, 2026
Merged

refactor(log-viewer): deliver the log to every view through context only#945
lcottercertinia merged 3 commits into
certinia:mainfrom
lukecotter:refactor-context-log-delivery

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

The log reached the views by two paths: the logContext provider and a log:loaded event that five components listened to through LogLoadedController. Two paths meant two orders, and a component disconnected when the event fired missed that log for good.

A new log is a new LogStore, so the context alone rebuilds every consumer. This retires the second path, and fixes a border token #944 left invisible.

Changes

  • Retire LogLoadedController and the log:loaded event — the context is the one delivery path.
  • Let HotPath, HotSpots, CallTreeDetail, DatabaseTimeTree and LogDiagnosticsView consume the store and rebuild on the one logStore guard.
  • Drop the eager firstUpdated / connectedCallback rebuilds that guard already covers, and the two currentLogStore() wrappers the move orphans.
  • End --lana-surface-border in panel-border, not transparent — a defined-but-invisible token had killed the minimap frame, the timeline label leader lines, the gauge and sparkline tracks, the grid header rule and the find widget outline.
  • Cut .claude/rules/log-viewer.md to the rules, 73 lines to 48, and record the comment rule in AGENTS.md.

Test plan

  • pnpm test — 131 suites, 1771 tests. pnpm lint, then a production build.
  • Dev host, long sample log: each tab loads its log on first open; the minimap frame, a gauge track, the grid header rule and the find widget outline all show a hairline. Checked in a light and a dark theme.

No CHANGELOG entry: internal, and the borders it restores belong to unreleased work.

…idget.border

`--lana-surface-border` ended its fallback chain in `transparent`, so on a
theme that sets neither `widget.border` nor `sideBar.border` the token was
defined but invisible, and the consumer fallbacks behind it could no longer
fire. The minimap frame, the timeline label leader lines, the gauge and
sparkline tracks, the grid header rule and the find widget outline all lost
their line.

End the chain in `panel-border`, which every theme registers, and in a
literal for a host outside VS Code.
`.claude/rules/log-viewer.md` had grown rationale prose around each rule, so
the rule itself was hard to find. Rewrite it to 48 lines from 73, keeping
every rule, and add the one the token fix earns: a fallback chain must not
end in `transparent`.

Record the comment rule in `AGENTS.md`: only what the code cannot say, one
short line, only where needed.
The log reached the views by two paths: the `logContext` provider and a
`log:loaded` event that five components listened to through
`LogLoadedController`. A new log is a new store, so the context alone is
enough to rebuild every consumer.

Retire the controller and the event, and let the five components consume the
store. Two `currentLogStore()` wrappers are orphaned by the move and go with
it.
@lcottercertinia
lcottercertinia merged commit 5287516 into certinia:main Aug 19, 2026
7 checks passed
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.

2 participants