Repository navigation
Cables and circuits: edit mode, route drawing, cores and circuit colours - #3
Merged
Merged
Conversation
- 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
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.
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.tsedits files through the yaml Document API, one write at a time, and never touches imported data (an imported signal gets an overlay entry insignals.yaml). New points get the next free number for their level, room and type.server/src/circuits.tsresolves the circuit behind each point and device, also up apowered_bychain.HADOC_READONLY=1turns 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