Skip to content

fix(page-perf): post-merge review fixes for #825 - #851

Merged
antosubash merged 4 commits into
mainfrom
fix/pr825-review
Nov 6, 2026
Merged

antosubash merged 4 commits into
mainfrom
fix/pr825-review

Conversation

@antosubash

@antosubash antosubash commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

#825 was merged without the full /ship gate. This PR is that gate run after the fact: a maintainability review and a Codex correctness review (three passes, the last clean), then browser QA of the background-tasks pages.

Correctness fixes

  • simple_module_db.query_stats: a child task started inside track_queries() no longer adds to the count after the block exits.
  • Background tasks › Workers: Refresh is disabled only while its own request runs, so a failed deferred snapshot can be recovered. When the deferred load and a manual Refresh race, the newer reading (polled_at) wins.
  • page_audit:
    • prop sizes count UTF-8 bytes, matching the response serializer (non-ASCII payloads were undercounted);
    • a redirect to an unexpected path such as the login page now fails the page, while trailing-slash canonicalisation stays a warning and percent-encoding is not treated as a redirect;
    • CLS uses session windows (the largest window with gaps under 1 s, at most 5 s long) instead of summing every shift;
    • --max-pages caps the initial paths and rejects values below 1.

Maintainability

  • docs/frontend/performance.md and the page-perf SKILL.md match the code:
    • both development and testing use the Vite dev server;
    • the audit evaluates <h1> count and unnamed controls, not the document title.
  • CLAUDE.md and the middleware docstring list the development-only ServerTiming middleware.
  • The Workers snapshot loader is a plain async def deferred through a lambda, like the Index page's.
  • The audit test is renamed test_cli_skill_page_audit.py to match the files beside it.

Each correctness fix has a regression test. The Workers race test fails without the fix.

Verification

Re-run after merging main (module-layout moves #856–#862). The merge had one conflict in the Workers page test imports, now resolved.

  • /ship ran again on the merged branch: optimize found nothing; correctness and maintainability review came back clean; browser QA passed.
  • Browser-verified on port 8211 with a live Celery worker:
    • /admin/background-tasks/workers: skeleton, then the worker card; Refresh and rapid Refresh behave;
    • Executions, Outbox, Logs, Detail and their back links work, with no redirects;
    • no console errors; CLS 0.002.
  • Local CI: make lint green, make test-js 900 passed, make test-py 8,155 passed / 47 skipped.
  • Verification report: https://claude.ai/artifact/UQUoJnS6gLhpwRLAxAvpEZ

QA Report

Report links are Claude Artifacts and start private; the author can share them from claude.ai/code/artifacts if reviewers need access.

Test plan

  • On /admin/background-tasks/workers, skeleton cards show until the worker data arrives, Refresh stays usable, and its back link has no redirect.
  • CI is green.

https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2

…s a missing snapshot; audit fixes (UTF-8 sizes, unexpected redirects fail, CLS session windows, --max-pages)

Correctness findings from a post-merge Codex review of #825.

Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
… deferred load; percent-encoded paths are not redirects

Second review pass on the #825 follow-up.

Claude-Session: https://claude.ai/code/session_01FXHA3ZJ5EgoJN4zXTAhBR2
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-05T22:24:24.980090Z 8f5914c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Deploying simple-module-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0bc2982
Status: ✅  Deploy successful!
Preview URL: https://b4798e89.simple-module-python.pages.dev
Branch Preview URL: https://fix-pr825-review.simple-module-python.pages.dev

View logs

…5-review

# Conflicts:
#	modules/background_tasks/tests-js/background_tasks_WorkersPage.test.tsx
@antosubash
antosubash merged commit 0d8011c into main Nov 6, 2026
17 checks passed
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