mirror of
https://github.com/multica-ai/multica.git
synced 2026-09-28 13:23:48 +08:00
* MUL-7737: feat(views): address bar for HTML attachment previews HTML attachments render in a sandboxed srcdoc iframe, so the document's URL is about:srcdoc and location.search is always empty. A self-contained mock that picks its screen with `?s=overview` could only show its default screen. A one-line bridge script placed in front of the author's markup gives the document a real query and fragment through history.replaceState (Chromium and WebKit allow an opaque-origin document to rewrite them), resolves relative pushState/replaceState URLs against the document, reports address changes to the parent, and turns `?…` link clicks into navigate requests. The viewer and the full-page preview get a reload button and an address field after the file name. A new query reloads the document; a fragment-only change navigates in place. "Open in new tab" carries the address as `loc`, and the full page keeps it in the desktop tab's view state across tab switches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> * MUL-7737: feat(views): put the HTML address in the viewer's top bar The address bar took a row of its own above the document. The file name in the top bar is the fixed part of the address anyway, so it now is the address: the query and fragment follow the file name and are edited in place. A document at its bare address reads as just the file name, so files that never use an address look as before; hovering or focusing shows the field and a hint of where to type. Reload joins the HTML view controls, disabled with them in the source view. The address state moves from the stage to PreviewPanel, which owns both the bar and the stage, and resets per file since the viewer pages to the next file without remounting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>