Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

One hub per home, Android crash on long messages, todo card, KiCad projects below the root - #86

Closed
jlcjak wants to merge 1 commit into
i2cjak:mainfrom
jlcjak:sync-fixes
Closed

jlcjak wants to merge 1 commit into
i2cjak:mainfrom
jlcjak:sync-fixes

Conversation

@jlcjak

@jlcjak jlcjak commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Four fixes found on a real install:

  • Messages not reaching other clients. Opening the window while --headless ran for the same home started a second hub on the same log, so what was typed in one client never reached the others. A hub now writes <home>/hub.lock. A window finding a live hub joins it over its port (and reconnects if it restarts); --headless says one is already running and starts nothing.
  • Android crashing a second after launch. A 14k-character message went through Img.may, which lowered the whole text with String.to_lower (one non-tail call per character). That overflowed the V8 sandbox, which crashes natively and took the app with it. Img.may now scans once, tail-recursively. If the sandbox ever dies again, the client starts over in QuickJS and reconnects instead of crashing.
  • Todo card hiding the work. The window showed the first six steps, mostly finished ones. Todo.rows now shows six steps starting just before the first open one, with "… N done" / "… N more" lines, on window, web and phones (laws todo_rows_*).
  • KiCad projects not in the root, or several. .backplane.json takes "project" (a .kicad_pro path). With none in the root, the shallowest project found up to four folders down is used. The agent sees every project found and is told how to make the one it works on canonical.

Tested:

  • scripts/check.sh and scripts/test.sh
  • test/native/kicad_files.bend
  • the window joining a headless hub on a copy of a real log (Xvfb): messages both ways, hub restart
  • the phone client replayed on that log at a 500 KB V8 stack
  • the APK on an emulator against that log

🤖 Generated with Claude Code

…he work; KiCad projects below the root

- A hub writes <home>/hub.lock. A window started while `--headless` runs
  for the same home joins that hub over its port instead of starting a
  second hub on the same log (messages typed in one client never reached
  the others). `--headless` says it already runs and starts nothing. A
  joined window keeps running when the hub restarts and reconnects.
- Android crashed a second after opening on a log with a 14k-character
  message: Img.may lowered the whole text with String.to_lower, which
  recurses per character and overflowed the V8 sandbox (a native crash
  that took the app down). Img.may now scans once, tail-recursively,
  lowering only the characters after each dot. If the sandbox ever dies
  anyway, the client starts again in QuickJS and reconnects.
- The todo card showed the first six steps, mostly done ones. Todo.rows
  shows six from the one before the first open step, with "… N done" and
  "… N more" lines, on the window, web and phones (laws todo_rows_*).
- KiCad projects: .backplane.json takes "project" (a .kicad_pro path); with
  none in the root, the shallowest found up to four folders down is used.
  Every project found is listed to the agent, which is told how to make the
  one it works on canonical.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@jlcjak

jlcjak commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Moved to BackplaneWorks/Backplane#28 (merged).

@jlcjak jlcjak closed this Oct 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant