Open the region-share page from Start session, link prefilled #12

Merged
oss merged 15 commits from feat/XSH-8-share-from-session into selfhost 2026-11-11 12:52:26 +01:00
Owner

Kaneo XSH-8. Stacked on #5 (base feat/XSH-1-conditional-saves); retarget to selfhost once that merges.

What

  • Start session also opens /share/ (the excalidraw-share creator) in a new tab. The tab opens inside the click, so popup blockers allow it; once the room exists it navigates to /share/#room=<id>,<key>, and it closes again if the room never comes up (15 s, or startCollaboration finishing without a link).
  • The live-session dialog gets a Share a region button next to Stop session, for when the tab was blocked or closed.
  • The room key travels only in the URL fragment, so neither Caddy's logs nor the share server see it in a request line. The creator drops it from its address bar after reading it (oss/excalidraw-share#1, commit f4b989b).

Tests

  • excalidraw-app/tests/regionShare.test.ts: URL keeps the key in the fragment; tab opened at once, opener cut, navigated when the link appears, listener cleaned up; tab closed when the room fails; room still starts when the tab is blocked.
  • tsc, eslint on the changed files, vitest run excalidraw-app green.

🤖 Generated with Claude Code

Kaneo XSH-8. Stacked on https://git.ossalali.com/oss/excalidraw/pulls/5 (base `feat/XSH-1-conditional-saves`); retarget to `selfhost` once that merges. ## What - **Start session** also opens `/share/` (the excalidraw-share creator) in a new tab. The tab opens inside the click, so popup blockers allow it; once the room exists it navigates to `/share/#room=<id>,<key>`, and it closes again if the room never comes up (15 s, or `startCollaboration` finishing without a link). - The live-session dialog gets a **Share a region** button next to Stop session, for when the tab was blocked or closed. - The room key travels only in the URL fragment, so neither Caddy's logs nor the share server see it in a request line. The creator drops it from its address bar after reading it (https://git.ossalali.com/oss/excalidraw-share/pulls/1, commit f4b989b). ## Tests - `excalidraw-app/tests/regionShare.test.ts`: URL keeps the key in the fragment; tab opened at once, opener cut, navigated when the link appears, listener cleaned up; tab closed when the room fails; room still starts when the tab is blocked. - `tsc`, eslint on the changed files, `vitest run excalidraw-app` green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(selfhost): Start session opens the region-share page for the new room, plus a Share a region button
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
5cc9d1c8d8
The tab opens inside the click so browsers allow it, follows the active room link once the
room exists and closes if it never does. The room key travels only in the URL fragment.

Refs XSH-8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oss force-pushed feat/XSH-8-share-from-session from 5cc9d1c8d8
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
to 56cf560716
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
2026-11-11 10:04:02 +01:00
Compare
feat(selfhost): pick the shared area on the board instead of in a second tab
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
77ef5f8486
Start session starts the room and goes straight to picking: the owner
drags a rectangle on the real board, a panel sets the edges guests may
extend and the expiry, and Create link returns the guest link with Copy
and End share. Share a region in the session dialog picks the same way,
Escape or Cancel leaves a plain session. The rectangle is an overlay in
scene coordinates and never enters the drawing; the overlay is a canvas
so wheel pan and zoom keep working while picking.

Refs XSH-8
fix(selfhost): the area picker's panel stays above its drawing surface
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
bac88af21a
The editor gives every canvas inside it z-index 1, which lifted the
transparent surface over the panel and swallowed its clicks.

Refs XSH-8
fix(selfhost): the area picker isolates the editor, ends late shares, follows one pointer, works by keyboard
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
0de6338c55
While picking, editor shortcuts, cut and paste no longer reach the board
underneath (zoom shortcuts still do). A share whose creation completes
after the picker closed is ended at once. The drag follows only the
pointer that started it, and a cancelled drag keeps the previous area.
Use the visible area sets the area without a pointer, and focus starts
in the panel.

Refs XSH-8
fix(selfhost): while picking, the editor itself takes navigation only
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
2154e5af54
Blocking keys at window capture could not stop listeners the editor had
registered earlier, such as the command palette. Picking now sets the
editor's interaction to navigation only, so every user input path,
shortcuts, clipboard and palette commands included, refuses to change
the drawing while wheel pan and zoom keep working. View mode is put
back afterwards when picking started from it. Escape still leaves
picking first.

Refs XSH-8
fix: the editor refuses user insertions while it is non-interactive
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
d148221a7d
Library items chosen in the command palette or library sidebar, and the
chart-paste dialog, inserted elements through addElementsFromPasteOrLibrary
without consulting isInteractionEnabled, so a non-interactive editor still
changed. The insertion method now refuses when interaction is off. The
region picker test drives the real palette to prove it.

Refs XSH-8
fix: the editor refuses image insertions while it is non-interactive
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
d4801e69f5
A pasted web image is downloaded before insertImages runs, so a paste
started while interactive could land after interaction was switched off.
insertImages now refuses when interaction is off, which also covers
dropped files and the image tool's file picker. Placeholders already on
the board when interaction switches off still finish loading, since that
completes an insertion made before.

Refs XSH-8
fix(selfhost): picking closes open dialogs and the stats panel
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
f89ecf6204
The element-link selector and the stats panel edit the drawing directly,
outside the editor's interaction switch, so either one left open stayed
usable while picking. Picking now closes any open dialog and the stats
panel, and reopens the stats panel afterwards.

Actions started before picking that finish during it (a dropped or
opened file, a pasted image or Mermaid text, a dropped embed URL)
complete as they would have, like collaborators' edits arriving during
picking; picking itself never edits the drawing.

Refs XSH-8
fix: clear canvas and open scene count as user actions; picking restores view mode exactly
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
c1c2d451a0
The clear-canvas confirmation, the main menu's Open and two palette
commands ran their actions with the default "api" source, so the
editor's non-interactive guard let them through. They now pass the
source they come from, and ending interaction also closes a pending
clear-canvas confirmation, like the eye dropper and type popup.

After picking, view mode returns to what it was before picking; with
the stats panel open it was restored from the forced view mode and left
the owner unable to edit.

Refs XSH-8
feat(selfhost): stopping the live session also ends the board's guest links
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
a3374883a3
Stop session, from the session dialog or the command palette, now ends
every region share of the room once the session has really stopped (not
when the owner cancels the prompt). If the links cannot be ended, the
owner gets an error that points to the share list.

Refs XSH-8
feat(selfhost): Go to guest moves the owner's screen to what a guest sees
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
5bc8bb2b76
While a live session runs, a Go to guest button beside Share asks the
share service what each connected guest has on screen and fits the
owner's view to it; with several guests each click goes to the next,
with a "Guest n of m" toast. No guest, or a failed lookup, is said in a
toast.

Refs XSH-8
fix(selfhost): Go to guest works on phones and ignores answers for a room left meanwhile
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
da9ee7c5b3
The lookup moved into useGoToGuest, shared by the top-bar button and a
new main-menu entry, which phones can reach. An answer that arrives
after the owner left or switched rooms is dropped.

Refs XSH-8
fix(selfhost): Go to guest ignores a second click while a lookup runs and is free again in a new room
All checks were successful
upkeep / dispatch (pull_request_target) Has been skipped
d9825c9b20
Refs XSH-8
oss changed target branch from feat/XSH-1-conditional-saves to selfhost 2026-11-11 12:52:08 +01:00
oss merged commit b1d827e06d into selfhost 2026-11-11 12:52:26 +01:00
oss deleted branch feat/XSH-8-share-from-session 2026-11-11 12:52:26 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
oss/excalidraw!12
No description provided.