Pages: Set as opening page, so a shared file opens on the page the team chooses (#1817) (#1972)

* M9: page.setOpening sets the page a shared file opens on, for everyone who joins (#1817)

A file on a figcraft-server opened on the page current at publish time, with no way to change it:
`DocProp::CurrentPage` was synced but nothing wrote it (`page.select` is each viewer's own page,
only a local save stamps the document). `page.setOpening {id?}` writes `doc.current_page` as a
document edit: one undo step, a synced change in a live session, so every later join opens on it;
the current page when none is named; a divider or a layer refused; nobody's own page moves. The
pages list's context menu gets "Set as opening page". Docs: mcp.md, collaboration-parity.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* M9: the pages menu's new string is in the English catalog (#1817)

The gate's i18n test wants every tr() key in locales/en.toml.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: the parity doc states the default when no opening page is set (#1972 issue)

With none set, a file opens on its saved current page, not the first page, and a link cannot name a page, so the row is partial.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: one sharing row, and the spotlight exception on the opening-page row (#1972 issue)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: the parity row states where the joiner's page comes from (#1972 issue)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Opening page: a no-op set adds no step, deleting the opening page falls back, and the tests cover junk ids, refusals, undo and the menu item (#1817)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* M5: the chosen opening page is saved with the file and opens it for everyone (#1817)

The opening-page flag now lives on the page node (NodeKind::Page opening), so it syncs
through the existing node kind. Saving writes the flagged page as current_page instead of
the page the saver was viewing. A duplicated page does not copy the flag, and deleting the
page removes it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Trevor BrownandClaude Sonnet 5.5 authored and GitHub committed 2026-11-15 00:05:48 -06:00
1 parent adad8a08ad
commit 3bbd1d3ce5
14 files changed
+315 -10

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ fn pages_can_be_inserted_onto_a_page_less_base() {
assert!(d.pages.is_empty() && d.node_count() == 0);
let p = Node::new(
NodeId(C3 | 1),
NodeKind::Page { background: figcraft_color::Color::DEFAULT_PAGE, flows: vec![], prototype: Default::default() },
NodeKind::Page { background: figcraft_color::Color::DEFAULT_PAGE, flows: vec![], prototype: Default::default(), opening: false },
"P",
0.0,
0.0,
+7 -2
View File
@@ -439,8 +439,13 @@ impl Document {
/// Add a page at the end.
pub fn add_page(&mut self, name: &str) -> NodeId {
let id = self.alloc_id();
let node =
Node::new(id, NodeKind::Page { background: Color::DEFAULT_PAGE, flows: Vec::new(), prototype: Default::default() }, name, 0.0, 0.0);
let node = Node::new(
id,
NodeKind::Page { background: Color::DEFAULT_PAGE, flows: Vec::new(), prototype: Default::default(), opening: false },
name,
0.0,
0.0,
);
self.nodes.insert(id, Arc::new(node));
self.dirty.touch(id);
self.pages.push(id);
+1 -1
View File
@@ -312,7 +312,7 @@ impl Document {
let id = self.alloc_id();
let node = Node::new(
id,
NodeKind::Page { background: figcraft_color::Color::DEFAULT_PAGE, flows: Vec::new(), prototype: Default::default() },
NodeKind::Page { background: figcraft_color::Color::DEFAULT_PAGE, flows: Vec::new(), prototype: Default::default(), opening: false },
STORE_NAME,
0.0,
0.0,
+4
View File
@@ -91,6 +91,10 @@ pub enum NodeKind {
flows: Vec<crate::proto::Flow>,
#[serde(default)]
prototype: crate::proto::PrototypeSettings,
/// The page chosen to open the file on for everyone (`page.setOpening`; at most one page):
/// saving writes it as the document's `current_page` instead of the page the saver was viewing.
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
opening: bool,
},
Frame,
Group,
+2 -1
View File
@@ -85,7 +85,8 @@ impl FileSnapshot {
/// files are from its folder.
fn encode_at(&self, path: Option<&str>) -> Result<Vec<u8>> {
let mut doc = (*self.doc).clone();
doc.current_page = Some(self.page);
let opening = doc.pages.iter().copied().find(|&p| matches!(doc.get(p).map(|n| &n.kind), Ok(NodeKind::Page { opening: true, .. })));
doc.current_page = Some(opening.unwrap_or(self.page));
if let Some(path) = path {
crate::library::relate_links(&mut doc, path);
}
+35 -3
View File
@@ -1,7 +1,7 @@
//! Pages.
use figcraft_doc::proto::Flow;
use figcraft_doc::{Guide, NodeId, NodeKind};
use figcraft_doc::{Document, Guide, NodeId, NodeKind};
use serde_json::{Value, json};
use super::{CommandSpec, ok};
@@ -109,8 +109,8 @@ pub fn specs() -> Vec<CommandSpec> {
// The copy keeps the page's colour, flows (pointing at the copied frames), prototype settings and guides.
let guides = doc.get(src)?.guides.clone();
doc.get_mut(np)?.guides = guides;
if let NodeKind::Page { background, flows, prototype } = doc.get(src)?.kind.clone()
&& let NodeKind::Page { background: b, flows: f, prototype: pr } = &mut doc.get_mut(np)?.kind
if let NodeKind::Page { background, flows, prototype, .. } = doc.get(src)?.kind.clone()
&& let NodeKind::Page { background: b, flows: f, prototype: pr, .. } = &mut doc.get_mut(np)?.kind
{
*b = background;
*f = flows
@@ -147,6 +147,38 @@ pub fn specs() -> Vec<CommandSpec> {
}
ok()
}),
spec!(
"page.setOpening",
"Set as opening page",
"{id?} (the page the file opens on, for everyone who opens or joins it; the current page when none is named)",
true,
|s, p| {
// A document property (#1817), so it syncs in a live session and undoes; nobody's
// own page moves (`page.select` is each viewer's).
let id = page_target(s, "page.setOpening", p)?;
if s.doc()?.is_divider(id) {
return Err(bad("page.setOpening", "a divider isn't a page to open on"));
}
let is_opening = |doc: &Document, p: NodeId| matches!(doc.get(p).map(|n| &n.kind), Ok(NodeKind::Page { opening: true, .. }));
if s.doc()?.current_page == Some(id) && is_opening(s.doc()?, id) {
// Already the opening page: nothing changes, so no undo step.
return ok();
}
let doc = s.doc_mut()?;
doc.current_page = Some(id);
// The flag lives on the page node (so it syncs with the node's kind): one page has it.
for page in doc.pages.clone() {
let want = page == id;
if is_opening(doc, page) != want
&& let NodeKind::Page { opening, .. } = &mut doc.get_mut(page)?.kind
{
*opening = want;
}
}
settle(s, "page.setOpening")?;
ok()
}
),
spec!("page.list", "List pages", "{}", false, |s, _| {
let doc = s.doc()?;
let cur = s.page()?;
+28
View File
@@ -552,3 +552,31 @@ fn leaving_the_session_goes_back_to_snapshot_undo() {
s.execute("edit.undo", &json!({})).unwrap();
assert_eq!(s.doc().unwrap().node(r).unwrap().name, "Live");
}
/// #1817: the page a file opens on is a document property: setting it syncs to the server, so
/// everyone who joins afterwards lands on it, and moves nobody's own view.
#[test]
fn the_opening_page_syncs_and_moves_no_ones_view() {
let mut room = Room::new(base(), 2, 7);
let first = room.server.document().first_page().unwrap();
let cover = NodeId(room.s(0).execute("page.add", &json!({"name": "Cover"})).unwrap()["id"].as_u64().unwrap());
room.settle();
room.check();
assert_eq!(room.s(1).page().unwrap(), first, "another person's page is their own");
room.s(0).execute("page.setOpening", &json!({"id": cover})).unwrap();
room.settle();
room.check();
assert_eq!(room.server.document().current_page, Some(cover), "the server's file opens on it now");
assert_eq!(room.s(1).page().unwrap(), first, "nobody's view moved");
assert_eq!(Session::with_document(room.server.document().clone()).page().unwrap(), cover, "whoever joins next lands on it");
// One undo step, the setter's.
assert_eq!(room.s(0).execute("edit.undo", &json!({})).unwrap()["undone"], true);
room.settle();
room.check();
assert_ne!(room.server.document().current_page, Some(cover), "undone for everyone");
assert_eq!(
Session::with_document(room.server.document().clone()).page().unwrap(),
first,
"whoever joins after the undo lands on the restored page"
);
}
+2
View File
@@ -460,6 +460,8 @@ mod page_clipboard_tests;
#[cfg(test)]
mod page_copy_navigation_tests;
#[cfg(test)]
mod page_opening_tests;
#[cfg(test)]
mod page_target_tests;
#[cfg(test)]
mod paint_index_tests;
+175
View File
@@ -0,0 +1,175 @@
//! `page.setOpening` (#1817): the page a file opens on, for everyone who opens or joins it, written
//! as a document change (so it syncs and undoes) without moving anyone's own view.
use figcraft_doc::NodeId;
use serde_json::{Value, json};
use crate::Session;
fn ex(s: &mut Session, cmd: &str, p: Value) -> Value {
s.execute(cmd, &p).unwrap_or_else(|e| panic!("{cmd}: {e}"))
}
fn id_of(v: &Value) -> NodeId {
NodeId(v["id"].as_u64().unwrap())
}
/// Setting the opening page writes the document, leaves this viewer where they are, is one undo
/// step, and a file opened from that document lands on it.
#[test]
fn the_opening_page_is_written_without_moving_the_view_and_a_reopened_file_lands_on_it() {
let mut s = Session::new();
let first = s.page().unwrap();
let cover = id_of(&ex(&mut s, "page.add", json!({"name": "Cover"})));
ex(&mut s, "page.select", json!({"id": first}));
let depth = s.undo_depth().0;
ex(&mut s, "page.setOpening", json!({"id": cover}));
assert_eq!(s.doc().unwrap().current_page, Some(cover), "written to the document");
assert_eq!(s.page().unwrap(), first, "the view stays where it was");
assert_eq!(s.undo_depth().0, depth + 1, "one undo step");
let reopened = Session::with_document(s.doc().unwrap().clone());
assert_eq!(reopened.page().unwrap(), cover, "a file opened from this document lands on it");
ex(&mut s, "edit.undo", json!({}));
assert_ne!(s.doc().unwrap().current_page, Some(cover), "undone");
assert_eq!(Session::with_document(s.doc().unwrap().clone()).page().unwrap(), first);
}
/// Without an id the current page is meant; a divider and a layer are refused and change nothing.
#[test]
fn the_current_page_is_the_default_and_dividers_and_layers_are_refused() {
let mut s = Session::new();
let two = id_of(&ex(&mut s, "page.add", json!({"name": "Two"})));
assert_eq!(s.page().unwrap(), two, "page.add goes to the new page");
ex(&mut s, "page.setOpening", json!({}));
assert_eq!(s.doc().unwrap().current_page, Some(two), "the current page when none is named");
let divider = id_of(&ex(&mut s, "page.add", json!({"name": "-"})));
let r = id_of(&ex(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 10, "height": 10})));
let (view, depth) = (s.page().unwrap(), s.undo_depth());
assert!(s.execute("page.setOpening", &json!({"id": divider})).is_err(), "a divider isn't a page to open on");
assert!(s.execute("page.setOpening", &json!({"id": r})).is_err(), "a layer isn't a page");
assert_eq!(s.doc().unwrap().current_page, Some(two), "refusals change nothing");
assert_eq!(s.page().unwrap(), view, "the viewer's page is where it was");
assert_eq!(s.undo_depth(), depth, "and no undo step was added");
}
/// An id that is no node at all errors and changes nothing.
#[test]
fn an_unknown_id_is_refused_and_changes_nothing() {
let mut s = Session::new();
let first = s.page().unwrap();
let depth = s.undo_depth();
assert!(s.execute("page.setOpening", &json!({"id": 987_654_321u64})).is_err(), "no such node");
assert_eq!(s.doc().unwrap().current_page, Some(first));
assert_eq!(s.undo_depth(), depth);
}
/// Setting the page that already is the opening page changes nothing and adds no undo step.
#[test]
fn setting_the_page_that_already_opens_the_file_adds_no_undo_step() {
let mut s = Session::new();
let first = s.page().unwrap();
assert_eq!(s.doc().unwrap().current_page, Some(first));
ex(&mut s, "page.setOpening", json!({"id": first}));
let depth = s.undo_depth();
ex(&mut s, "page.setOpening", json!({"id": first}));
assert_eq!(s.undo_depth(), depth, "already the opening page: no step");
assert_eq!(s.doc().unwrap().current_page, Some(first));
}
/// Deleting the opening page leaves the file opening on a page that exists.
#[test]
fn deleting_the_opening_page_falls_back_to_a_page_that_exists() {
let mut s = Session::new();
let first = s.page().unwrap();
let cover = id_of(&ex(&mut s, "page.add", json!({"name": "Cover"})));
ex(&mut s, "page.setOpening", json!({"id": cover}));
ex(&mut s, "page.delete", json!({"id": cover}));
let doc = s.doc().unwrap().clone();
let now = doc.current_page.expect("an opening page remains");
assert!(doc.pages.contains(&now) && now != cover, "a page that exists");
assert_eq!(now, first);
assert_eq!(Session::with_document(doc).page().unwrap(), first, "a reopened file lands on it");
}
/// The file written by a real save (the serializer, not a cloned document), opened again.
fn saved_and_reopened(s: &Session) -> Session {
let bytes = crate::cmd::file::file_bytes(s.ds().unwrap()).unwrap();
let (doc, _) = figcraft_format::load_bytes(&bytes).unwrap();
Session::with_document(doc)
}
/// Saving writes the chosen opening page, not the page the saver was viewing.
#[test]
fn the_opening_page_survives_a_save_and_reopen_from_another_page() {
let mut s = Session::new();
let first = s.page().unwrap();
let cover = id_of(&ex(&mut s, "page.add", json!({"name": "Cover"})));
ex(&mut s, "page.select", json!({"id": first}));
ex(&mut s, "page.setOpening", json!({"id": cover}));
assert_eq!(s.page().unwrap(), first, "the saver stays on Page 1");
assert_eq!(saved_and_reopened(&s).page().unwrap(), cover);
}
/// With no opening page chosen, a file opens on the page it was saved on, as before.
#[test]
fn without_an_opening_page_a_file_reopens_on_the_page_it_was_saved_on() {
let mut s = Session::new();
let two = id_of(&ex(&mut s, "page.add", json!({"name": "Two"})));
assert_eq!(s.page().unwrap(), two);
assert_eq!(saved_and_reopened(&s).page().unwrap(), two);
}
/// A deleted opening page no longer decides: the file opens where it was saved.
#[test]
fn deleting_the_opening_page_falls_back_to_the_saver_s_page() {
let mut s = Session::new();
let cover = id_of(&ex(&mut s, "page.add", json!({"name": "Cover"})));
let two = id_of(&ex(&mut s, "page.add", json!({"name": "Two"})));
ex(&mut s, "page.setOpening", json!({"id": cover}));
ex(&mut s, "page.delete", json!({"id": cover}));
ex(&mut s, "page.select", json!({"id": two}));
assert_eq!(saved_and_reopened(&s).page().unwrap(), two);
}
/// Undoing the choice puts the saver's page back in charge.
#[test]
fn undoing_the_opening_page_then_saving_reopens_on_the_saver_s_page() {
let mut s = Session::new();
let cover = id_of(&ex(&mut s, "page.add", json!({"name": "Cover"})));
let two = id_of(&ex(&mut s, "page.add", json!({"name": "Two"})));
ex(&mut s, "page.setOpening", json!({"id": cover}));
ex(&mut s, "edit.undo", json!({}));
ex(&mut s, "page.select", json!({"id": two}));
assert_eq!(saved_and_reopened(&s).page().unwrap(), two);
}
/// Choosing another opening page takes the choice off the first.
#[test]
fn setting_another_opening_page_clears_the_first() {
let mut s = Session::new();
let a = id_of(&ex(&mut s, "page.add", json!({"name": "A"})));
let b = id_of(&ex(&mut s, "page.add", json!({"name": "B"})));
let c = id_of(&ex(&mut s, "page.add", json!({"name": "C"})));
ex(&mut s, "page.setOpening", json!({"id": a}));
ex(&mut s, "page.setOpening", json!({"id": b}));
let flagged: Vec<NodeId> = s.doc().unwrap().pages.iter().copied().filter(|&p| opening(&s, p)).collect();
assert_eq!(flagged, vec![b]);
ex(&mut s, "page.select", json!({"id": c}));
assert_eq!(saved_and_reopened(&s).page().unwrap(), b);
}
/// A copy of the opening page is just a page.
#[test]
fn a_duplicated_opening_page_is_not_an_opening_page() {
let mut s = Session::new();
let a = id_of(&ex(&mut s, "page.add", json!({"name": "A"})));
ex(&mut s, "page.setOpening", json!({"id": a}));
let copy = id_of(&ex(&mut s, "page.duplicate", json!({"id": a})));
assert_ne!(copy, a);
assert!(opening(&s, a));
assert!(!opening(&s, copy));
}
fn opening(s: &Session, p: NodeId) -> bool {
matches!(s.doc().unwrap().get(p).map(|n| &n.kind), Ok(figcraft_doc::NodeKind::Page { opening: true, .. }))
}
+1
View File
@@ -1405,6 +1405,7 @@ name = "English"
"Server for online sharing" = "Server for online sharing"
"Server key" = "Server key"
"Set as default" = "Set as default"
"Set as opening page" = "Set as opening page"
"Set corner smoothing to 60%" = "Set corner smoothing to 60%"
"Set variable" = "Set variable"
"Set variable mode" = "Set variable mode"
@@ -643,6 +643,50 @@ fn the_page_menus_rename_starts_with_the_keyboard_in_the_name() {
assert_clicking_page_opens_it(&mut u, p2, p1, r2);
}
/// Right-clicks `at` in the pages list and returns the menu's "Set as opening page" item, if shown.
fn opening_item(u: &mut Ui, at: Pos2) -> Option<Pos2> {
u.frame(vec![
Event::PointerMoved(at),
Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed: true, modifiers: Modifiers::NONE },
]);
u.frame(vec![Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed: false, modifiers: Modifiers::NONE }]);
let shapes: Vec<egui::Shape> = u.frame_output(vec![]).shapes.into_iter().map(|c| c.shape).collect();
crate::live_tests::has_text(&shapes, "Set as opening page").then(|| crate::live_tests::text_center(&shapes, "Set as opening page"))
}
/// The pages list's menu offers "Set as opening page" on a page and not on a divider, and using it
/// writes the document's opening page without moving the viewer's own page (#1817).
#[test]
fn the_page_menu_sets_the_opening_page_and_not_on_dividers() {
let mut s = Session::new();
let p1 = s.page().unwrap();
let p2 = id(s.execute("page.add", &json!({})).unwrap());
let div = id(s.execute("page.add", &json!({"name": "-"})).unwrap());
s.execute("page.move", &json!({"id": div, "index": 1})).unwrap();
s.execute("page.select", &json!({"id": p1})).unwrap();
let mut u = Ui::new(s);
let (r1, r2) = (page_row(&mut u, p1, p2), page_row(&mut u, p2, p1));
let mid = Pos2::new(r1.x, (r1.y + r2.y) / 2.0);
u.app.session.execute("page.select", &json!({"id": p1})).unwrap();
u.frame(vec![]);
assert_eq!(opening_item(&mut u, mid), None, "a divider has no such item");
u.frame(vec![Event::Key { key: egui::Key::Escape, physical_key: None, pressed: true, repeat: false, modifiers: Modifiers::NONE }]);
for _ in 0..5 {
u.frame(vec![]);
}
let item = opening_item(&mut u, r2).expect("a page has the item (and its menu is open)");
assert_ne!(u.app.session.doc().unwrap().current_page, Some(p2), "not the opening page yet");
u.frame(vec![Event::PointerMoved(item)]);
u.button(item, true);
u.button(item, false);
for _ in 0..3 {
u.frame(vec![]);
}
assert_eq!(u.app.session.doc().unwrap().current_page, Some(p2), "the document's opening page is the clicked page");
assert_eq!(u.app.session.page().unwrap(), p1, "the viewer's own page stays");
assert!(u.app.ui.last_error.is_none(), "{:?}", u.app.ui.last_error);
}
/// The y of the line between the pages and the layers, above the layers' row at `layer` (found by
/// the resize cursor it shows when hovered).
fn pages_edge_at(u: &mut Ui, layer: f32) -> f32 {
+7
View File
@@ -333,6 +333,13 @@ fn pages(app: &mut FigApp, ui: &mut Ui) {
}
ui.close();
}
// The page the file opens on, for everyone (#1817); a divider can't be one.
if !divider && ui.button(tr("Set as opening page")).clicked() {
if !crate::menus::dev_mode_refuses(app, "page.setOpening") {
app.run("page.setOpening", json!({"id": id}));
}
ui.close();
}
if ui.button(tr("Delete page")).clicked() {
if !crate::menus::dev_mode_refuses(app, "page.delete") {
delete_page(app, id);
+4 -1
View File
@@ -1,6 +1,6 @@
# Collaboration parity
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-06 · **Change:** minor (M9: a joined live session reconnects until you leave and says when it is disconnected, and joining it again merges what you did while disconnected; ; a file shared on the local network can be shared to look at only: a view-only code next to the edit code, picked in the Share popover before or while sharing)
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-06 · **Change:** minor (a shared file's opening page can be set (`page.setOpening`, Set as opening page in the pages list) and syncs to everyone who joins afterwards (#1817); numbers unchanged) · **Target:** Figma Design (desktop app 126.10.7); M9: a joined live session reconnects until you leave and says when it is disconnected, and joining it again merges what you did while disconnected; ; a file shared on the local network can be shared to look at only: a view-only code next to the edit code, picked in the Share popover before or while sharing)
Figma is multiplayer first; FigCraft is local first. **Ready ~13% (estimated):** comments, version
history and branches (review and merge) work inside one file; the real-time collaboration core landed in #103 (sync model,
@@ -15,6 +15,7 @@ cursors, selections, text carets, cursor chat and spotlights shown live ([`colla
| Real-time co-editing | yes | **core built, no networking** (#103): client-scoped ids, per-property change sets with fractional positions, server ordering and validation, optimistic clients, binary messages; randomized multi-client convergence tests over real commands. Live sessions over the network landed (`crates/collab-net`): the WebSocket transport (keep-alive, size and rate limits, a live connection reconnecting until you leave, and rejoining with offline edits merged), hosting from the app (this machine or the local network) with invite links, live cursors with name tags, selections, avatars and follow, `collab.*` commands. Document sync between apps works over them (the host's server orders every batch; guests open the host's file as a new tab). Sessions are per document: each open file has its own or none, several run at once (host one, join another, publish a third) and keep syncing behind the tab in front, and closing a file ends its session only. Revert to saved is refused until the document leaves its live session; its access checks and sync association stay intact. Undo is per person (only your own steps, others' later writes left alone), refused edits roll back with a toast, and a reconnect resumes as the same client with what it missed (or a snapshot) and sends what was made offline. The browser build joins (same messages through the browser's WebSocket API); `figcraft://` invite links open the desktop app and join. Styles, variables, collections, modes and comments made in a session take ids from their creator's space (the server checks it), so concurrent creations all survive; modes, per-mode values and replies inside one entry still resolve last-writer-wins. A standalone `figcraft-server` keeps many files, persists them (a snapshot plus a log, compacted), loses nothing confirmed across a restart (apps resume as the same participants) and takes files published from the app (File ▸ Publish to server…). The desktop app and the CLI open `wss://` links too (TLS through a reverse proxy), and releases ship the server for Linux with a deployment guide (systemd, Caddy, nginx, Docker) and `install.sh`. A server can be open to the public: anyone publishes without the key, within limits per address, and files nobody opens expire. Message limits follow the server's `max_file_mb`, so files above 64 MiB publish and open (the client takes at most 1 GiB from a server, and the server warns when large limits meet open publishing, #705); a damaged generation field in a file's log no longer drops the edits flushed to it (#687). Image entries are checked as they apply: a key must be a plain name (letters, digits, `-`, `_`; it becomes `images/<key>` in a saved file), bytes under a content-hash key must hash to it (lowercase sha256), a side is at most 65 535 px and the decoded bytes at most 256 MiB (what the importers read), a key's bytes can't be replaced and an image a layer shows can't be removed, so no collaborator can poison the shared image store or balloon memory; snapshots and server logs from before these checks open without the images they refuse (#1086). The batches kept for apps that reconnect are bounded in bytes by default (64 MiB; `max_log_mb` on `figcraft-server`), and an app further behind catches up with a snapshot (#1069). Placing a layer among its siblings is a binary search, so large pastes and reorders in one batch no longer take quadratic time (#1065). A refused batch's fixes take time linear in the batch: each deleted layer is restored once and each entry fix looked up once (#1063). Left: server archives beyond Linux | 25–55 |
| Live cursors, selections, viewports; follow / observation mode; spotlight | yes | **done, in live sessions**: named cursors (one name for live sessions and comments: Preferences ▸ Your name, also in the Share popover and the Join dialog, kept in the browser too; a rename shows at once in the sessions you're in, #1380), selection outlines, avatars (an AI agent attached over MCP also shows its avatar and an outline around the layers it last edited or selected while it works, in or out of a session, #1416), follow (click an avatar), others' text carets and selected characters with their names, a note when two people type in one layer; spotlight (your avatar's menu, `collab.spotlight`): everyone follows your view and page, people who join later too, anyone who moves their view stops following and a banner offers to follow again, a newer spotlight takes over. Left: polish (no accounts, so anyone in the session can spotlight) | 2–4 |
| Cursor chat, audio, high-fives | yes | **partial, in live sessions**: cursor chat (`/` opens a bubble at your pointer; everyone sees it as you type, it fades a few seconds after the last change, Enter sends and Escape takes it back, 100 characters; `collab.cursorChat` for agents); sent as ephemeral presence the host checks and rate-limits, never stored. No audio, high-fives or emote reactions | 2–5 |
| Opening page of a shared file | the page a link names, else the first | **partial**: a file joined from a server opens on its opening page, which is the open document's current page: the page the file was opened on (the page stored in the file when it was opened, else the first page) until someone sets one, not always the first page; a later page switch, a save on another page or publishing does not move it (a local save stamps the page being viewed into the saved file's bytes for the next time that file is opened, but does not change the open document's opening page, which is the synced property, and a link cannot name a page; `page.setOpening {id?}` (the pages list's Set as opening page, the MCP server too) writes it as a document change, one undo step, so everyone who joins afterwards lands on it, unless a spotlight is on, in which case they follow the spotlighter's page instead; each viewer's own page stays their own (#1817) | — |
| Share links, permissions (view / edit), teams and projects | yes | **partial**: sharing with a join code from the Share popover (online: the file goes to the server in Preferences and the server names its edit, comment and view links with short codes; local network: the app hosts and the code carries its address, with an edit code and a view-only code, picked before or while sharing, whose holders see every change and can't make one; one field joins with a code or a link, in the popover and on the home screen, and the Join dialog then shows the join until its file is ready (Cancel), or why it failed (Try again, #1381); the browser build also joins from a link in its URL's fragment, `#join=…`, which never reaches the web host's logs, capped at 6 KiB and checked like a `figcraft://` link (#712; unit-tested, not run in a browser), and shares online and publishes to a server as the desktop app does, though not on the local network (#917; the owner token of a file it puts on an open server lasts as long as the page)); `figcraft-server` share links per file with edit, comment or view access (a viewer sees changes and presence, a "View only" badge and only the moving tools; a commenter also adds, replies to, reacts to and resolves comment threads, with a "Can comment" badge and the comment tool, #1525; the server refuses their other edits), revocable at once, tokens stored as hashes; managed from the app's Share popover (first links), the server's command line or a managing connection. On a server open to the public, whoever published a file manages it with its owner token (links, name, removal: `collab.manageFile`), which the app remembers: Home ▸ Online lists your online files (open again as owner, start and stop sharing, copy the code, rename, remove, forget), with one request per server for what became of them; anyone in a file can report it, and the operator blocks addresses. The person hosting a session, or a file's owner, removes someone from it (right-click their avatar, `collab.removePerson`): they are disconnected and their address can't join that file again while it runs. The list is per computer; a server only a team reaches can also list the files shared from it now for everyone (`team_files`): Home ▸ Online shows that team list for the server in Preferences, a row joins its file, and its links (`figcraft://join?server=…&file=…&team=1`, or the browser build's) carry no secret and stop working with the share. No accounts, teams or projects | 8–17 |
| Comments: pins on frames and layers, threads, reactions, @mentions, resolve, unread, search and filters, links, in the presenter | yes (shared) | **done, local**: stored in the file, your name from Preferences (an AI agent attached over MCP comments as its own name, marked Agent); a behaviour suite from the documentation (pinning and following layers, threads, own edits and deletes, mentions, reactions, C and Shift+C, stepping, filters, saving, copy and paste); restoring a version keeps them. `comment.list` (CLI, MCP) gives each message its `mentions` (`{name, known, you}`, by the highlighting rule). In a live session threads sync and anyone in it can reply, react and resolve (no accounts: a name is who you are) | (shared once multiplayer lands) |
| Version history: named versions, autosave checkpoints, view before restore, restore, duplicate | yes (cloud) | **done**, saved in the `.figcraft` file: restoring keeps the replaced design as an autosave first, a titled autosave becomes a named version, merging a branch records the file before and after. Versions are per person in a live session (a shared history needs accounts); no comparing two versions (Developer Mode compares a ready-for-dev layer with its state when marked) | — |
@@ -26,6 +27,8 @@ cursors, selections, text carets, cursor chat and spotlights shown live ([`colla
| Date | Change | Summary |
|---|---|---|
| 2026-11-06 | minor | M9, #1972 review: the opening-page row said **done** but the default differs from the reference. With no opening page set, a file opens on the page that was current when it was saved or published (`Document::current_page`, written by save), which can be any page, where the reference opens on the first page, and a link cannot name a page. Regraded **partial**; setting the opening page is unchanged. Numbers unchanged. |
| 2026-11-04 | minor | M9, #1817: a file on a server opened on the page that was current at publish time, with no way to change it: `DocProp::CurrentPage` was synced but nothing wrote it. `page.setOpening {id?}` (the pages list's "Set as opening page", the MCP server too) writes the opening page as a document change, one undo step, so everyone who joins afterwards lands on it; a divider is refused; nobody's own page moves. Tests: `page_opening_tests`, `collab_live_tests::the_opening_page_syncs_and_moves_no_ones_view`. Numbers unchanged. |
| 2026-11-04 | minor | M9: a session you joined no longer turns into a local file by itself. A dropped connection reconnects until you leave (a minute's pause after each 12 attempts, a pause Retry now skips); only the host ending the session and refusals that are for good stop it; queued messages go out paced. While disconnected the tab shows a red mark and a strip across the canvas says so; a session that ended stays on its tab with Try again, Save a copy and Dismiss |
| 2026-11-04 | minor | M9: joining a session again merges what you did while disconnected as one undoable edit, through the three-way merge branches use, as the same client when the server still knows it. What conflicts keeps the other person's, and your whole version opens beside it as an unsaved copy. A server that no longer knows you merges the same way instead of discarding unconfirmed work |
| 2026-11-06 | patch | M9, #2026: one conflicting auto layout edit added a conflict for every size and place it moved (a padding changed on both sides of a file with one instance gave 10, with 15 instances 138), and a `layout` conflict took all auto layout fields together, so a gap changed only on the branch was lost if main won the padding. `merge::plan` now leaves out values both sides work out for themselves: a hugging frame's or a filling child's size, text sizing to its characters, an auto layout child's place (when both sides turn it the same way) and a value a layer in an instance takes from its main; merging keeps the file merged into's own value and normalising lays it out from the merged inputs. `layout` and `childLayout` merge field by field: a field changed on one side merges, each field changed both ways is its own conflict (`<id>/layout.padding`, shown as auto layout padding with both sides' values). Tests: `branch_tests::one_conflicting_auto_layout_edit_is_one_conflict`, `branch_tests::auto_layout_fields_changed_one_way_survive_a_conflict`, `branch_tests::sizes_auto_layout_works_out_never_conflict`; the merge fuzz test leaves worked-out values out of what each side must show |
+4 -1
View File
@@ -691,7 +691,10 @@ on; `key` resolves keys the way the canvas does. Commands behind keys:
in the pages list, never opened and holding no layers), `page.list` (each page's `divider`),
`page.rename`, `page.move {id, index}`, `page.duplicate` ("Copy of …", after its source, with its colour,
flows (starting at the copied frames), prototype settings and guides),
`page.delete` (the last page that isn't a divider stays).
`page.delete` (the last page that isn't a divider stays), `page.setOpening {id?}` (the page the
file opens on for everyone who opens or joins it, the current page when none is named, a divider
refused: a document change, so it syncs in a live session and undoes, #1817; the choice is saved
with the file and opens it for everyone, whichever page the saver was on).
- `component.list`: each component's `folder` (the Assets panel's folders: its page, the frames
holding it, then its name's slash parts) and `label` (the name on its tile).
- `view.contextMenu` (`Shift+F10`): the selection's context menu, at its layer row when the layers