Skip to content

fix(app): harden view audit completion#10651

Merged
lalalune merged 2 commits into
developfrom
fix/10196-view-audit-completion
Jul 1, 2026
Merged

fix(app): harden view audit completion#10651
lalalune merged 2 commits into
developfrom
fix/10196-view-audit-completion

Conversation

@lalalune

@lalalune lalalune commented Jul 1, 2026

Copy link
Copy Markdown
Member

Refs #10196. Follow-up to #10603, which closed the Android WebView full-telemetry gap for this issue.

Summary

  • Harden audit:views so the soak now records raw view runtime/render/module-cache telemetry, per-view scorecards, heap samples, frontend/network logs, screenshots, and a Playwright video, then fails on missing paths, first-run blocks, render-guard errors, missing cleanup/evictions, page errors, or unbounded heap.
  • Add retained-lazy cacheKey telemetry attribution so evictions/releases can be tied back to registered views and overlay apps.
  • Fix the desktop residuals found during final review: /character/documents render/fetch churn, logs hydration/layout-shift attribution, and Settings title/back-button overlap.
  • Add focused tests for retained lazy attribution, layout-shift route attribution, and Logs hydration behavior.

Evidence

All artifacts are committed under .github/issue-evidence/10196-views-state/.

  • audit:views real app soak: passed 22/22 registered view paths, 44 activations, 33 runtime show events, 32 release evictions, max render count 1, 0 render-guard errors, 0 page errors, heap bounded at ~1.01x.
  • audit:views raw artifacts: audit-views-runtime-telemetry.json, audit-views-render-telemetry.json, audit-views-module-cache-telemetry.json, audit-views-heap-series.json, audit-views-navigation.json, audit-views-frontend-log.json, audit-views-network-log.json, audit-views-scorecard.md/json.
  • Screenshots/video: audit-views-soak.webm, soak-final.png, representative view-*.png, audit-views-logs-loaded.png, audit-views-settings.png.
  • App visual audit: bun run --cwd packages/app audit:app passed 349/349. Touched/reachable views manually reviewed as good; report/contact sheet committed as audit-app-report.json, audit-app-manual-review.md, audit-app-reviewed-contact-sheet.png.
  • Live LLM trajectories/audio/native mobile captures: N/A for this follow-up; no prompt, model, action, voice, audio, native-device, or connector behavior changed here. The Android WebView evidence for views/state: the plugin-view "OS" has no mounted-view lifecycle, memory accounting, or render/eviction gate — telemetry rings exist but nothing walks every system/developer/plugin view and asserts on them #10196 was supplied by fix(app): add Android view-runtime soak #10603.

Validation

  • bun install --frozen-lockfile passed with no lockfile changes.
  • node --check packages/app/scripts/audit-views-soak.mjs passed.
  • bunx @biomejs/biome@2.5.1 check on touched source/test files passed.
  • Focused UI tests passed: 10 files / 58 tests.
  • bun run --cwd packages/ui typecheck passed.
  • bun run --cwd packages/app audit:app passed: 349/349.
  • bun run verify passed on rebased develop at 2026-07-01T03:24:41Z: 474/474 Turbo tasks plus post-audits and dist-path consumer checks.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6bfb3bd7-0a37-4321-94c3-485978f98e4b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/10196-view-audit-completion

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@NubsCarson

Copy link
Copy Markdown
Member

Independent validation for #10651 on head cf86c0b582:

  • git diff --check origin/develop...HEAD && git diff --check passed.
  • node --check packages/app/scripts/audit-views-soak.mjs passed.
  • bun install --frozen-lockfile --ignore-scripts passed with no lockfile changes.
  • bunx @biomejs/biome check on the 14 touched source/test files passed.
  • bun run build:core passed: 64/64 tasks.
  • bun run --cwd packages/ui test -- src/components/pages/LogsView.test.tsx src/hooks/useLayoutShiftMonitor.test.ts src/retained-lazy.churn.test.ts src/retained-lazy.test.tsx passed: 4 files, 13 tests.
  • bun run --cwd packages/ui typecheck passed.

I did not rerun the full committed audit:views/audit:app visual artifact capture in this pass; the PR branch already includes those artifacts and the focused code gates above did not expose a regression. GitHub checks are still pending/skipped/pass only from the queue snapshot.

@lalalune

lalalune commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Focused review/validation from my local pass on current head cf86c0b58282:

bun run --cwd packages/ui test -- src/components/pages/LogsView.test.tsx src/hooks/useLayoutShiftMonitor.test.ts src/retained-lazy.test.tsx src/retained-lazy.churn.test.ts
bunx @biomejs/biome check packages/app/scripts/audit-views-soak.mjs packages/ui/src/App.tsx packages/ui/src/components/apps/AppWindowRenderer.helpers.ts packages/ui/src/components/character/CharacterHubView.tsx packages/ui/src/components/pages/DocumentsView.tsx packages/ui/src/components/pages/LogsView.tsx packages/ui/src/components/pages/LogsView.test.tsx packages/ui/src/components/pages/SettingsView.tsx packages/ui/src/components/views/ViewTelemetryProfiler.tsx packages/ui/src/hooks/useLayoutShiftMonitor.ts packages/ui/src/hooks/useLayoutShiftMonitor.test.ts packages/ui/src/retained-lazy.tsx packages/ui/src/retained-lazy.test.tsx packages/ui/src/retained-lazy.churn.test.ts
bun run --cwd packages/ui typecheck
bun run --cwd packages/app typecheck

Results: focused UI tests passed (4 files, 13 tests); Biome pass; packages/ui typecheck pass; packages/app typecheck pass. I also manually opened the committed contact sheet plus audit-views-logs-loaded.png, audit-views-settings.png, and soak-final.png; the touched screens are visible and I did not see overlap/clipping in those captures.

Evidence caveat before using this as final #10196 closeout proof: .github/issue-evidence/10196-views-state/audit-views-frontend-log.json contains repeated browser console Failed to load resource 404s, for example /api/connectors/google/accounts, /api/transcripts, and /api/database/status; audit-views-network-log.json also contains multiple net::ERR_ABORTED requests. Those may be expected optional-service/nav-churn noise, but the evidence should either classify them as expected or the audit should fail/filter them explicitly. I would not call the evidence fully clean while those entries are unexplained.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@lalalune

lalalune commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Pushed f6abc6d90a24 to address the evidence caveat I noted above.

What changed:

  • audit-views-soak.mjs now classifies network entries and writes audit-views-network-summary.json.
  • Future audit:views runs fail on any unclassified network failure.
  • The two expected classes are explicit: fast route-churn net::ERR_ABORTED requests and optional local-service 404s for /api/connectors/google/accounts, /api/transcripts, and /api/database/status.
  • The committed evidence now includes the summary: 59 total network entries, 36 expected navigation aborts, 23 expected optional-route 404s, 0 unexpected. The scorecard and soak JSON reference the new artifact.

Validation:

  • node --check packages/app/scripts/audit-views-soak.mjs
  • bunx @biomejs/biome check packages/app/scripts/audit-views-soak.mjs
  • jq empty .github/issue-evidence/10196-views-state/audit-views-network-summary.json .github/issue-evidence/10196-views-state/audit-views-soak.json
  • git diff --check origin/develop...HEAD

I did not rerun the full visual/audit capture after this patch; this is script hardening plus classification of the already committed raw network log.

@NubsCarson

Copy link
Copy Markdown
Member

Independent latest-head validation for #10651 on f6abc6d90a2489d719bc52873e57b1b9c730afa0.

This reruns validation after the follow-up that classifies network noise in the view audit evidence. I used a fresh worktree; after bun install --frozen-lockfile --ignore-scripts, I had to run the normal generated-output prep (bun run build:core, then bun run --cwd packages/shared build:i18n) before UI/app tests, because the fresh worktree initially lacked packages/shared/src/i18n/generated/validation-keyword-data.js.

Latest-head checks green:

  • git diff --check origin/develop...HEAD
  • node --check packages/app/scripts/audit-views-soak.mjs
  • jq empty .github/issue-evidence/10196-views-state/audit-views-network-summary.json .github/issue-evidence/10196-views-state/audit-views-soak.json
  • bunx @biomejs/biome check packages/app/scripts/audit-views-soak.mjs packages/ui/src/App.tsx packages/ui/src/components/apps/AppWindowRenderer.helpers.ts packages/ui/src/components/character/CharacterHubView.tsx packages/ui/src/components/pages/DocumentsView.tsx packages/ui/src/components/pages/LogsView.tsx packages/ui/src/components/pages/LogsView.test.tsx packages/ui/src/components/pages/SettingsView.tsx packages/ui/src/components/views/ViewTelemetryProfiler.tsx packages/ui/src/hooks/useLayoutShiftMonitor.ts packages/ui/src/hooks/useLayoutShiftMonitor.test.ts packages/ui/src/retained-lazy.tsx packages/ui/src/retained-lazy.test.tsx packages/ui/src/retained-lazy.churn.test.ts
  • bun run build:core — 64/64 successful
  • bun run --cwd packages/ui test -- src/components/pages/LogsView.test.tsx src/hooks/useLayoutShiftMonitor.test.ts src/retained-lazy.churn.test.ts src/retained-lazy.test.tsx — 4 files / 13 tests passed
  • bun run --cwd packages/ui typecheck
  • bun run --cwd packages/app typecheck

Worktree is clean. GitHub checks remain queued/UNSTABLE; I do not see a local blocker in this pass.

@lalalune lalalune merged commit 744ef8f into develop Jul 1, 2026
12 of 61 checks passed
@lalalune lalalune deleted the fix/10196-view-audit-completion branch July 1, 2026 04:09
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