Skip to content

feat: copy one report of the whole session - #31

Open
lxsmnsyc wants to merge 2 commits into
feat/async-panelfrom
feat/session-report
Open

lxsmnsyc wants to merge 2 commits into
feat/async-panelfrom
feat/session-report

Conversation

@lxsmnsyc

Copy link
Copy Markdown
Member

Adds a copy button to the dock header that puts one Markdown report of everything the devtools noticed on the clipboard. It is for when it is not clear which panel holds the problem. This PR is based on #30.

Changes

  • The report has, newest first:
    • the three newest errors in full, with their mapped stacks and source, and a count of the rest;
    • every issue with its severity, count, owner path and message, up to 20;
    • the five newest timeline actions, with their writes, re-runs, calls, time and outcome;
    • the async records that were flagged, up to 10;
    • the server calls that failed.
  • A section appears only when its panel has something. With nothing at all, the report says so.
  • Each panel's report functions are reused. Error reports move two heading levels down with demote, which skips code blocks.
  • session-report.ts and the stack mapping are imported when the button is pressed, so they stay out of the main bundle like the error panel.
  • Values with sensitive names are redacted, as in every other report.

Example

From the test fixture, after a few clicks:

# Solid devtools session

## Issues (3)

- warn `SILENT_HOLD` in `<App> > <Show> > value > <AsyncProfile>`: click on button#next-user "next user" wrote "userId" (1 → 2); the write was held 605ms …
- warn `STRICT_READ_UNTRACKED` in `<App> > <Show> > value > <DraftReader>`: Reactive value "draft" read directly in <DraftReader> will not update. …
- info `ASYNC_WATERFALL` in `<App> > <Show> > value > <AsyncProfile> > posts`: 2 sequential async flights …

## Recent actions, newest first

- `click on button#next-user "next user"`, 3 writes, 4 re-runs in 606.5ms, held: `userId`, `user`, `posts`
- `click on button#call-server "call server"`, 0 writes, 0 re-runs, 1 call in 1.3ms, idle

## Async concerns (4)

- `wait on user, posts`, 605.4ms: no pending state shown, started by `click on button#next-user "next user"`
- `chain user → posts`, 603.1ms: loads ran one after another

Testing

  • Unit tests in src/dev-toolbar/report/session-report.test.ts cover demote, the empty report, and a report with a section from every panel.
  • A new e2e test makes an action and an issue, copies the session, and checks the sections.
  • pnpm test, pnpm typecheck, pnpm format:check, pnpm build, pnpm check and the full e2e suite pass locally.

🤖 Generated with Claude Code

- The dock header has a copy button for a session report, for when it is not clear which panel holds the problem.
- The report has the three newest errors in full, every issue with its count and owner, the five newest timeline actions, the flagged async records, and the failed server calls. A section appears only when its panel has something.
- Each panel's report is reused. The error reports move two heading levels down to sit inside their section.
- The session report and the stack mapping load when the button is pressed, so the main bundle does not grow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The session report lists the five newest actions. It now skips the updates the timeline hides by default, so runtime updates do not push real actions out.
- An e2e test checks that the timeline hides those updates and brings them back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lxsmnsyc
lxsmnsyc force-pushed the feat/session-report branch from eb1484b to e4a6a60 Compare October 24, 2026 14:13
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.

1 participant