Repository navigation
feat(native): sync HTML page themes and reader actions - #176
Merged
Merged
Conversation
rynfar
force-pushed
the
nw/87-html-frames-2
branch
from
November 3, 2026 21:04
5e64685 to
3013be6
Compare
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues #87 after #91. HTML attachments previously kept the default page colours/fonts, trapped app shortcuts, and opened links without respecting the native destination preference.
Inline and full-screen pages now receive live named-theme colours (converted to sRGB like web), reader font stacks and keybindings without reloading. The shortcut bridge uses web's view-command allowlist and rejects mutating/conflicting bindings and forged named-key/code pairs. Settings exposes the browser destination and PR-link off switch for HTML pages, with web defaults.
The rendered transcript supplies the page's scoped owner, including side chats. A pure core boundary requires a surviving owning view with the same current environment/thread, current active environment, WebKit focus, and recent native user activation before accepting link/shortcut bridge actions. Size notifications stay focus-independent, as on web. Browser tabs use that owner's thread. PR/MR links resolve against readable projects in the link's environment: repository match first, then allowed host lending, with config-loaded, authority/port, Forgejo mount and Azure constraints. Unresolvable links fall through to the browser preference. Context chips reuse the resolver. Forgejo projects without a resolved browser URL use the HTTP remote authority, including its port, for repository matching and host lending; a default-port link cannot borrow a project on another port. With a resolved browser URL, repository matching still checks clone authority, while host lending follows only the browser URL authority and mount, as web does.
HTML now has
sandbox allow-scripts allow-forms, matching web. Both native new-window callbacks suppress HTML popup events, and the core boundary rejects any raw navigation event still delivered to either HTML frame mode. The exact-document main-frame lock and page-only IPC remain intact.Routing exceptions and remaining gaps:
partial.Validation:
cargo test --workspace: 1,220 passed. The existing provider/port case also covers default-port rejection and matching-port success without ForgejowebUrl, plus clone-port/browser-URL differences: repository matching rejects the mismatch while host lending succeeds only under the resolved web mount. Both regressions failed before their fixes.cargo clippy --workspace --all-targets -- -D warnings; snapshot build; theme generator, parity sync and client-runtime conformance generation checks passed.check:changedexpands native Rust files to repo-wide work and was stopped; the required native gates were used.Evidence is local per factory instructions. GPUI's offscreen renderer shows the fallback card; companion hidden WebKit renders the page using the production document-start script and strict sandboxed response:
/private/tmp/native-87-evidence/before-dark-page.png,/private/tmp/native-87-evidence/before-light-page.png,/private/tmp/native-87-evidence/before-browser-settings.png./private/tmp/native-87-evidence/review-dark.png,/private/tmp/native-87-evidence/review-dark.html.png,/private/tmp/native-87-evidence/review-light.png,/private/tmp/native-87-evidence/review-light.html.png./private/tmp/native-87-evidence/review-live-update.png,/private/tmp/native-87-evidence/review-live-update.png.json(computed styles and retained mounted marker)./private/tmp/native-87-evidence/after-browser-settings.png,/private/tmp/native-87-evidence/after-pr-link-settings.png,/private/tmp/native-87-evidence/after-pr-links-disabled.png./private/tmp/native-87-evidence/forgejo-web-lending-tests.log,/private/tmp/native-87-evidence/forgejo-web-lending-clippy.log,/private/tmp/native-87-evidence/forgejo-web-lending-build.log; focused red/green logs:/private/tmp/native-87-evidence/forgejo-web-lending-red.log,/private/tmp/native-87-evidence/forgejo-web-lending-green.log.Unverified: trusted WebKit clicks, typing, shortcut delivery, actual browser/PR opens, wheel handoff and menus over a page. Synthetic WebKit input is dropped; routing is proved in core, not by fabricated runtime input. No real window, paid turn, download, clipboard use, new server or live-home write was used.
Surface check: native HTML and its local settings only; web is the reference. No server, contracts, provider adapters or agent-facing text changed. Existing attachment I/O remains environment-scoped for local/remote connections.
Built with GPT-6.1 Sol in Codex