Skip to content

improve(browser): narrow dashboard lifetime rechecks - #147892

Merged
steipete merged 1 commit into
mainfrom
codex/sqlite-round15-plugins-landing
Sep 14, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/sqlite-round15-plugins-landing

Conversation

@steipete

@steipete steipete commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Related: #146197

What Problem This Solves

Browser dashboard cleanup repeatedly decodes all tracked tabs when it only needs to recheck one known tab.

User Impact

Dashboard lifetime checks fetch the selected tab directly, preserving current ownership checks and UI behavior. Unrelated malformed stored rows no longer block these selected-tab rechecks; discovery still reports them. Selected corrupt JSON still fails, with the diagnostic operation now labeled lookup.

Why This Change Was Made

Six existing identity-specific rechecks pass their captured key through the same record and key validator. Discovery, cleanup claims, conditional writes and current-authority assertions remain unchanged. No migration or operator action is required.

Evidence

  • 43 dashboard tests and 37 concurrency/SQLite-registry tests pass. The reconciliation regression fails on the original code at 85 enumerated rows versus a ceiling of 30.
  • Ten removals among 1,000 tabs: median wall time fell from 123.09 to 44.60 ms, CPU from 143.50 to 51.18 ms, fetched tab rows from 11,985 to 2,040, and returned text from 4,192,055 to 723,680 bytes. Result-fetch statement executions remained 424.
  • Six file-backed cases passed complete output, schema, state and reopen/write comparisons; eight error/expiry controls passed. Empty, single-tab and discovery-only controls retained equal native row and statement counts. Their wall medians were 1.41 to 1.47 ms, 7.22 to 6.78 ms, and 21.07 to 20.66 ms respectively.
  • Measurements use one warmup pair and seven alternating pairs through actual reconciliation and SQLite, with the existing CDP close boundary mocked. Counters were collected separately from timing; background compilers were active. These are not live-browser latency measurements.
  • Fresh independent review and all selected local checks pass, including production and test types, scoped lint, and storage guards.

@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 14, 2026 04:32
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 12:48 AM ET / 04:48 UTC.

ClawSweeper review

What this changes

The Browser plugin rechecks known dashboard tabs by storage key instead of decoding every tracked tab, with regression coverage for cleanup cost, identity changes, and corrupt rows.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, focused optimization absent from the fetched main revision. No introduced correctness or security defect was found.

Priority: P2
Reviewed head: 86cb7fc722050f8fdfb4009735e924e6f351e8f8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused optimization with relevant regression coverage, qualified performance evidence, and no actionable defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER status exempts this internal optimization from external-contributor proof requirements. Reported file-backed reconciliation measurements exercise the changed SQLite path with browser closure mocked; no live-browser result is claimed, and the patch does not materially change authority.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER status exempts this internal optimization from external-contributor proof requirements. Reported file-backed reconciliation measurements exercise the changed SQLite path with browser closure mocked; no live-browser result is claimed, and the patch does not materially change authority.
Evidence reviewed 9 items Introduced production changes: The verified merge-base-to-head diff narrows six identity-specific rechecks and retains the existing validators, discovery operations, conditional writes, and authority assertions.
Selected records retain validation: Both lookup and enumeration pass through the same record parser and recomputed storage-key check; omitted keys still select full discovery. This is a private Browser helper, not a new public plugin API.
Storage and cleanup contracts: The existing SQLite lookup restricts plugin, namespace, key, and expiry. Cleanup independently rereads its claim before closure and conditionally retires only the matching record; those mechanisms are unchanged.
Findings None None.
Security None None.

How this fits together

Browser dashboards let users and agents share a managed browser tab. The Browser plugin reconciles saved dashboard definitions with SQLite tab records to retain, stop, or release the corresponding browser target.

flowchart TD
  A[Dashboard requests and cleanup events] --> B[Current dashboard definition]
  B --> C[Browser lifetime owner]
  C --> D[Discover tracked tabs]
  C --> E[Recheck selected SQLite row]
  D --> F[Validate identity and current ownership]
  E --> F
  F --> G[Retain or close managed tab]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +10, Tests +133. Total +143 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 22 12 +10
Tests 1 133 0 +133
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 155 12 +143

Review metrics

Metric Value Why it matters
Reported reconciliation materialization 11,985 → 2,040 fetched rows; statement executions unchanged at 424 The file-backed synthetic benchmark supports reduced decoding and transfer work, rather than fewer SQL executions or a live-browser latency claim.

Technical review

Best possible solution:

Keep selected-tab validation within the existing Browser owner, using keyed reads while preserving full discovery and fingerprinted cleanup.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a functional bug reproduction: source confirms repeated full-store enumeration, and the PR reports a failing pre-change row-budget regression; this review did not execute benchmarks.

Is this the best way to solve the issue?

Yes: reusing the existing keyed-store lookup removes unnecessary materialization without adding storage, caching, configuration, or a competing owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 93841b3e826d.

Labels

Label changes:

  • add P2: A bounded performance improvement reduces repeated SQLite materialization during Browser dashboard cleanup.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER status exempts this internal optimization from external-contributor proof requirements. Reported file-backed reconciliation measurements exercise the changed SQLite path with browser closure mocked; no live-browser result is claimed, and the patch does not materially change authority.

Label justifications:

  • P2: A bounded performance improvement reduces repeated SQLite materialization during Browser dashboard cleanup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER status exempts this internal optimization from external-contributor proof requirements. Reported file-backed reconciliation measurements exercise the changed SQLite path with browser closure mocked; no live-browser result is claimed, and the patch does not materially change authority.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 49c3d46 adds extensions/browser/src/browser-dashboard.ts:151 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 49c3d463e19f; files: extensions/browser/src/browser-dashboard.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 51352c5 into main Sep 14, 2026
166 checks passed
@steipete
steipete deleted the codex/sqlite-round15-plugins-landing branch September 14, 2026 05:02
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 14, 2026
* commit 'e3d8d0078369b21223c70028c4502c89f1420897': (51 commits)
  fix: background requests delay opening chats (#147845)
  chore(i18n): refresh native locales (#147899)
  feat: start remote sessions without a repository (#147773)
  fix(slack): retire probe sockets after timeout (#147846)
  refactor(agents): share theme ANSI color encoding (#147838)
  improve(memory): bound vector recall decision counts (#147900)
  improve(browser): narrow dashboard lifetime rechecks (#147892)
  test(discord): compact lifecycle matrices (#147855)
  fix(agents): use exact model rows for harness support (#147849)
  test(agents): compact embedded lifecycle matrices (#147856)
  test(agents): compact embedded admission matrices (#147853)
  test(cli): compact node management matrices (#147854)
  feat(artifacts): select assistant-delivered files by run (#147682)
  improve: reduce event-loop work when recording prompts (#147876)
  fix: preserve readable generated image and video filenames (#147833)
  fix(ci): skip SDK rendering for identical revisions (#147572)
  fix: prevent false process failures and stalled background waits (#147871)
  fix(ui): restore live updates when retrying chat history (#147865)
  fix(ui): preserve text and image order in assistant replies (#147731)
  refactor(qa-lab): reuse approval result formatter (#147867)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: browser maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant