Skip to content

feat(site): keep the address bar a link to the model being edited - #36

Merged
Mearman merged 1 commit into
mainfrom
feat/live-address-bar
Oct 29, 2026
Merged

Mearman merged 1 commit into
mainfrom
feat/live-address-bar

Conversation

@Mearman

@Mearman Mearman commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

The explorer's address bar now holds the same link Copy link makes, and updates as the model or the selected index changes, so the link can be copied from the browser.

Writes use history.replaceState after the page has been still for ADDRESS_DEBOUNCE_MS, which is WebKit's window divided by its call limit, so editing adds no history entries, fires no hashchange and stays under WebKit's replaceState limit. A page in the state it opened with keeps its opened address (clean, or a gist's) and goes back to it when changed back. Text that is not yet valid JSON is kept in the fragment, so a reload does not lose it. A link longer than 1 MiB (Firefox's standard URL limit; Chromium's is 2 MiB) is not written: the fragment is cleared and the page says to share a gist.

The browser tests cover each of those against the built site, and fail when the replaceState call is removed. The deployed site is checked after the Pages run.

The fragment follows the editor text and the selected index, written
with history.replaceState after the page has been still for a moment,
so editing adds no history entries and fires no hashchange.
A page in the state it opened with keeps the address it opened at,
including a gist's, and returns to it when changed back.
A link past the longest address a browser is known to accept is not
written: the fragment is cleared and the page says to share a gist.
@chatgpt-codex-connector

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 ⚠️ Failed 2026-10-29T22:52:13.153408Z
We couldn’t complete this review. Comment @codex security review to try again.
28d7c4d 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit ecf3f8b into main Oct 29, 2026
11 checks passed
@Mearman
Mearman deleted the feat/live-address-bar branch October 29, 2026 23:03
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant