Repository navigation
feat(debug): ClaudePasteDetection dev module for #90 prompt-submit timing - #278
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds readRecentPasteSessions() + dev-debug:read-paste-events so the ClaudePasteDetection module can pull the per-paste journals already written to disk. Read side of a previously write-only journal. (#90) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…timeline Dev-debug module (#101 framework) for #90: live submit-detection regexes against the screen + issued->detected latency timeline (p50/p95, stuck count) reconstructed from the paste journals. Instrumentation only; no submit-path changes. Gated by AGENT_CODE_DEV_DEBUG. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
A
ClaudePasteDetectiondev-debug module on the existing #101 Dev Debug Panel framework, built to diagnose #90 (Claude prompt submit unreliable — detection falls behind under load). Pure instrumentation — no changes to the submit path itself.Two panes:
/\[Pasted text #\d+/placeholder + the spinner-activity regex) against the liveruntime.screen/runtime.screenMarkdowneach render, with the currentstreamPhase. Watch detection fire in real time.<userData>/paste-debug/<pasteId>.paste.jsonland reconstructs each submit's lifecycle: issued→detected latency, detected→CR, outcome (submitted/stuck/error), composer length, strategy — plus p50/p95 latency + failure count. This is Claude prompt submit still inconsistent — detection logic falls behind under load #90's "see the actual latency distribution" ask, surfaced from data we already capture but never read.How
readRecentPasteSessions()inpasteDebugJournal.ts+ adev-debug:read-paste-eventsIPC give the renderer-only module its main-process data (the journals were write-only at runtime).timeline.tsreducer (PasteDebugSession → SubmitLifecycle+ stats) holds all the digest logic — no React/IPC, keyed on the real event vocabulary (keydown:enter,placeholder:appeared|timeout,write:submit-cr,submit:returned|throw).placeholder:timeout(the 10ms poller giving up) — exactly the failure mode Claude prompt submit still inconsistent — detection logic falls behind under load #90 chases.Safety / scope
AGENT_CODE_DEV_DEBUG; the 1s poll only runs while the module is mounted (enabled), so zero cost when off.Test plan
AGENT_CODE_DEV_DEBUG=1; command palette → "Dev Debug Panel" → enable "Claude Paste / Submit Detection".[Pasted text #N]appears; timeline gains a row withissued→detlatency +submitted.stuck(red); failure count + p95 reflect it.Refs #90, #101.
🤖 Generated with Claude Code