Skip to content

Show visited markers and tinting earlier (6.10.2) - #21

Merged
jitdor merged 1 commit into
mainfrom
fix/startup-performance
Oct 3, 2026
Merged

jitdor merged 1 commit into
mainfrom
fix/startup-performance

Conversation

@jitdor

@jitdor jitdor commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Visible tiles previously remained unmarked until sync configuration, history, recovery journals, legacy migration, and DOMContentLoaded had all finished. Paint the local working copy immediately and observe newly inserted tiles during page loading. Read independent storage values concurrently, then reconcile journal state and refresh tiles before enabling controls or writing history.

Add regression tests that hold sync configuration or journal storage pending and verify early painting, no premature writes, and recovered settings/history. Also cover existing and inserted tiles before DOMContentLoaded.

Validation: syntax and whitespace checks; all 84 tests pass. In a local harness with 200 ms storage calls, first tile processing fell from 854 ms to 223 ms (simulated timing, not a live-device measurement).

Bump userscript and worker versions to 6.10.2 and add the changelog section for automatic release publication. Worker behavior is unchanged.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
19630f8 2026-10-03T00:02:40.150Z View logs ↗

@jitdor
jitdor merged commit 2c2816f into main Oct 3, 2026
2 of 3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19630f8903

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2147 to 2148
const root = document.body || document.documentElement;
if (!root) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Retry observation when the root does not exist

Because this userscript runs at document-start, a manager with synchronous GM storage APIs can finish both startup reads before the parser has created either <html> or <body>. In that case this expression yields null, the function returns without installing an observer, and nothing invokes it again until onReady() after DOMContentLoaded; consequently the new early tile painting does not work in that environment. Observe document itself or arrange to retry as soon as the root element appears.

Useful? React with 👍 / 👎.

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