Skip to content

Cables and circuits: edit mode, route drawing, cores and circuit colours - #3

Merged
MathiasVDA merged 1 commit into
mainfrom
feat/cables-circuits
Oct 11, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
feat/cables-circuits

Conversation

@MathiasVDA

Copy link
Copy Markdown
Contributor

Before: the plan was view-only. Cable routes, positions and links between PLC channels and points could only be changed by editing YAML by hand. There was no way to see which breaker feeds what, and a cable's cores and terminals were not shown.

After: an Edit button lets you drag points, place new ones, draw cable routes by tapping corners, and link PLC channels to points (or create the point on the spot). Every edit is written back into the hand-written YAML file with its comments kept, and can be committed to git (HADOC_GIT_COMMIT=1). Colour by circuit colours the plan per breaker with a legend, and a breaker lists everything it feeds. Cables list their cores with a colour swatch and the terminal each core lands on, and a cable shows up on every port one of its cores touches.

How: server/src/edit.ts edits files through the yaml Document API, one write at a time, and never touches imported data (an imported signal gets an overlay entry in signals.yaml). New points get the next free number for their level, room and type. server/src/circuits.ts resolves the circuit behind each point and device, also up a powered_by chain. HADOC_READONLY=1 turns editing off. The demo house gains circuits F1, F2 and F4, a 24 V terminal block and the cores of K-0012. Stacked on #2.

🤖 Generated with Claude Code

https://claude.ai/code/session_017KyUdSpsGYq6NV2mMmxJBv


Generated by Claude Code

- Edit API that writes points, cable routes and signal links back into the
  hand-written YAML files, keeping comments; optional git commit per edit
- Edit mode in the app: drag and place points, draw cable routes, link PLC
  channels to existing or new points
- Colour the plan by circuit, with a legend; a breaker lists what it feeds
- Cable cores with their terminals; a cable shows on every port a core touches

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KyUdSpsGYq6NV2mMmxJBv
@MathiasVDA MathiasVDA self-assigned this Oct 10, 2026
@MathiasVDA
MathiasVDA changed the base branch from feat/wago-import to main October 11, 2026 06:00
@MathiasVDA
MathiasVDA merged commit 977c1b2 into main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants