feat(debugger): dismiss-logbox tool + redbox-safe LogBox suppression#204
Draft
pFornagiel wants to merge 1 commit into
Draft
feat(debugger): dismiss-logbox tool + redbox-safe LogBox suppression#204pFornagiel wants to merge 1 commit into
pFornagiel wants to merge 1 commit into
Conversation
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
ARG-187 — hide the React Native LogBox banner reliably across the whole RN session without ever dismissing an open fullscreen redbox.
DISABLE_LOGBOX_SCRIPT: removed theLBData.clear()call, which routes throughsetSelectedLog(-1)and would dismiss an open fullscreen redbox. The banner is gated by_isDisabledalone, so clearing the data store was never necessary.dismiss-logboxMCP tool. Resolves the existingJsRuntimeDebugger:port:device_idservice (auto-connects if needed) and re-evaluates the disable script.alwaysLoad: trueso the agent can call it before any other debugger tool. Mirrorsdebugger-evaluate's URN/services shape.executionContextCreatedto the typedCDPClientEventsmap and emitted it inhandleMessage. The blueprint subscribes with a debounced two-stage re-eval (1500 ms + 3500 ms) so cmd-R / shake reload / fast-refresh full reload /DevSettings.reload/Page.reloadall recover the disabled state without the agent needing to re-call.argent-device-interact,argent-react-native-app-workflow(new §1.4 + quick-ref row), andargent-metro-debugger(tool-table row + prereqs paragraph).The fullscreen redbox shown for fatal/uncaught errors is preserved end-to-end.
Note for reviewers
.claude/rules/argent.mdis gitignored in this repo. The plan's<tapping_rule>LogBox callout edit lives only in my local working tree and is not in this PR. Apply it manually to your local.claude/rules/argent.mdor skip it — the three shipping skill files cover the same guidance.Test plan
Automated (
pnpm --filter @argent/tool-server test):disable-logbox-script.test.ts— asserts the script callsignoreAllLogs(true), never.clear(), and remains an IIFE.dismiss-logbox.test.ts— id,alwaysLoad, default port 8081, requireddevice_id, URN resolution.cdp-execution-context-event.test.ts— typedexecutionContextCreatedevent fires + genericeventstill fires (no regression).tsc --noEmitclean.Manual verification (Bluesky / iPhone 17 Pro / iOS 26.2 / Metro :8082):
DevSettings.reloadwipes aglobalThismarker and flipsLBData.isDisabled()fromtrue→false. Confirms the JS-context-reset condition Layer 3's listener recovers from..clear()) leaves an open fullscreen redbox visible; explicitLBData.clear()dismisses it (proves the bug existed and the fix addresses it).addLog({level:'error',…})produces the bottom banner with an enabled LogBox; fixed disable script hides it; subsequentaddLogwhile disabled produces no banner.Not directly observed via MCP (would require Node-side CDP subscription / MCP server rebuild):
Runtime.executionContextCreatedactually firing in this RN runtime — covered by the unit test against a mock WS loop, premise verified via state-reset proxy, ship-as-designed per the plan's "if it doesn't fire on this RN version, Layer 3 is a no-op but does no harm."dismiss-logboxend-to-end through the MCP transport — the underlyingcdp.evaluate(DISABLE_LOGBOX_SCRIPT)path was exercised directly viadebugger-evaluate.🤖 Generated with Claude Code