feat(read-only-viewer): editor viewer mode + kicadSetReadOnly binding#36
Closed
matejcsok-ee wants to merge 1 commit into
Closed
feat(read-only-viewer): editor viewer mode + kicadSetReadOnly binding#36matejcsok-ee wants to merge 1 commit into
matejcsok-ee wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Anonymous / non-member sessions open PUBLIC projects as read-only viewers.
- kicadSetReadOnly(bool) embind (merged kicad_editor + pcbnew/eeschema/
pl_editor TUs): sets the PCBJAM_READ_ONLY flag + Prj().SetReadOnly (greys
the setup dialogs). Polls until the frame exists.
- read-only-mode.ts: resolveReadOnly(access, win) — server `access:"read"` or
?readonly=1 (narrow-only; no ?readonly=0). ToolPage threads it in, omits
saveBytes (MEMFS-only saves).
- WasmTool: chrome force-hidden with a "View only" pill (toggle + Cmd+\
disabled), presence/cross-app/comments/drift skipped, save-driven room
writers unregistered, wasm frame locked via kicadSetReadOnly failing CLOSED
(stale bundle → boot error, never a writable frame).
- collab: bindKicadCollab {readOnly} — inert DOWN hook, never seeds a room;
UP observer + adopt stay live so peer edits render. index.ts / sheet-manager
thread readOnly + drop initial awareness (invisible observer).
- Reference backend emits access:"write".
Bumps kicad + web/pcbjam-shared to the read-only-viewer commits.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012DN9py5GuPdExaaFzE4k27
matejcsok-ee
force-pushed
the
feature/read-only-viewer
branch
from
July 10, 2026 19:34
37f1b6b to
49ee4f9
Compare
Contributor
Author
|
Landed on |
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.
Part of the read-only-viewer feature (GPL editor half). Depends on:
accessfield — bumped here)Server-side enforcement lives in the closed pcbjam-private PR.
What
Anonymous / non-member sessions open PUBLIC projects as read-only viewers.
kicadSetReadOnly(bool)embind (mergedkicad_editor+pcbnew/eeschema/pl_editorTUs): sets thePCBJAM_READ_ONLYflag +Prj().SetReadOnly(greys the setup dialogs). Polls until the frame exists.read-only-mode.ts—resolveReadOnly(access, win): serveraccess:"read"or?readonly=1(narrow-only; there is deliberately no?readonly=0).ToolPagethreads it in and omitssaveBytes(MEMFS-only saves).WasmTool: chrome force-hidden with a "View only" pill (toggle + Cmd+\ disabled), presence/cross-app/comments/drift skipped, save-driven room writers unregistered, wasm frame locked viakicadSetReadOnlyfailing CLOSED (a stale bundle without the export → boot error overlay, never a writable frame).bindKicadCollab {readOnly}— inert DOWN hook, never seeds a room; the UP observer + adopt branch stay live so peer edits render.index.ts/sheet-managerthreadreadOnlyand drop the initial awareness state (invisible observer).access:"write".Tests
tests/web/read-only-editor.spec.ts— viewer + writer two-tab: chrome-less viewer, real-path click/Delete inert, zoom alive, viewer never seeds. (The live-stream assertion is a documentedtest.fixme— blocked by a pre-existing applyItems layer-count regression at the current kicad rev, verified failing for two fully writable tabs; seedocs/features/read-only-viewerin the pcbjam-private PR.)read-only-mode.test.ts,kicad-binding.test.tsread-only cases.🤖 Generated with Claude Code
https://claude.ai/code/session_012DN9py5GuPdExaaFzE4k27