pcbjam/web/standalone
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Istvan Matejcsok 2652d6fa81 tool-switch: create the missing counterpart file instead of silently no-opping
Tools → "Switch to PCB Editor" in a project with no .kicad_pcb (e.g. created
from a lone schematic) did nothing: the nav hook found no file for the target
tool and returned false. Now a session that can persist (ToolPage passes the
new createFile prop) writes the templated counterpart via
createProjectFileIfMissing — no download fallback, and it re-checks existence
so a collaborator's file is never clobbered — then navigates to it, matching
native KiCad (pcbnew opens a new board at the derived path). Sessions that
can't persist (read-only viewers, scratch/local-folder) keep the logged no-op.

Also latch the quit dispatcher off before every deliberate tool-switch
navigation (markDeliberateNavigation): the wx port's UnloadCallback runs on
BEFOREUNLOAD and closes the top frame the moment the navigation starts, so
the quit hook history.back()'d over the in-flight navigation — the pagehide
latch is too late (it only fires at commit time).

e2e: new tests/web/tool-switch-missing-file.spec.ts reproduces the flow via a
browser-local (IDB) project created from the home page; playwright-web config
gains VITE_LOCAL_PROJECTS=idb and derives STANDALONE_PORT/CORS_ORIGIN from
WEB_APP_URL (runs the suite past a squatted :3048); both vars declared in
web/turbo.json globalEnv (turbo strict-env strips undeclared vars). Includes
the previously-uncommitted tool-switch spec repairs (URL grammar + z-30
boot-overlay wait).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 14:19:47 +02:00
..
public feat(site,demo): OG share cards + demo page meta ahead of the HN post 2026-07-04 09:14:44 +02:00
scripts refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
src tool-switch: create the missing counterpart file instead of silently no-opping 2026-07-16 14:19:47 +02:00
.env.example analytics: consolidate everything onto one shared Plausible pa- script 2026-07-15 19:34:09 +02:00
index.html feat(site,demo): OG share cards + demo page meta ahead of the HN post 2026-07-04 09:14:44 +02:00
package.json feat(collab): presence P1 — awareness transport + who's-here roster (collab-presence 0001) 2026-07-07 21:09:22 +02:00
postcss.config.js refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
tailwind.config.js refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
tsconfig.json feat: standalone save/load routing + VITE_DOC_SOURCE ydoc mode 2026-06-12 14:05:40 +02:00
vite.config.ts fix(collab): dedupe yjs so @pcbjam/shared + standalone link ONE instance 2026-06-30 09:54:50 +02:00
vitest.config.ts fix(collab): dedupe yjs so @pcbjam/shared + standalone link ONE instance 2026-06-30 09:54:50 +02:00