Archived
deploy.
This commit is contained in:
@@ -100,9 +100,13 @@ program name the run log shows, which is why the model defaults it to the comman
|
||||
<code>NC Code</code>, rather than to an empty string. It is also the detail the mission row brackets: the row
|
||||
reads <code>NC Code</code> while the title is empty or still that default, and <code>NC Code [title]</code> once it says
|
||||
something else.</p>
|
||||
<p>The panel renders on the command's own node in the Mission branch of the Execution page's Control
|
||||
Tree, below the move / duplicate / delete control bar. A single-purpose kind like this one embeds
|
||||
its whole editor on that node rather than growing section child nodes.</p>
|
||||
<p>The panel renders on the command's own node under the Mission root of the Execution page's Control
|
||||
Tree. The editor pane holds nothing but the editor: the command's move up / move down / duplicate /
|
||||
delete buttons and its drag handle sit on its tree row, and the Add Command <code>+</code> sits on the row of
|
||||
the list that holds it. A single-purpose kind like this one embeds its whole editor on that node
|
||||
rather than growing section child nodes. Its tree checkbox only decides whether the run plays the
|
||||
command; a disabled command is skipped during play — a caption above the title says so — and its
|
||||
editor stays usable.</p>
|
||||
<h2 id="layout">Layout</h2>
|
||||
<ul>
|
||||
<li>NcCodeCommand Panel
|
||||
@@ -124,7 +128,7 @@ folder is the <a class="xref" href="script-command-panel.html">Script command</a
|
||||
CodeMirror with a C# grammar, this one ships a text area.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Stats and Actions Row (web)
|
||||
<li>Stats and Actions Row
|
||||
<ul>
|
||||
<li>Line count and character count, both recomputed as the text changes.</li>
|
||||
<li>Trim Blank Lines Button — trims every line and drops the ones left empty, then saves at once.</li>
|
||||
@@ -137,11 +141,32 @@ CodeMirror with a C# grammar, this one ships a text area.</li>
|
||||
</ul>
|
||||
<h2 id="saving">Saving</h2>
|
||||
<p>Typing in either field schedules one save 400 ms after the last keystroke, so a burst of typing
|
||||
costs one request instead of one per character. Trim Blank Lines and Clear save immediately rather
|
||||
than through that timer.</p>
|
||||
costs one request instead of one per character. The title and the NC text share that timer, and the
|
||||
save carries every field edited since the last one. Trim Blank Lines and Clear save immediately
|
||||
rather than through that timer.</p>
|
||||
<p>The write is a single patch endpoint carrying the NC text and the title. Each field is applied only
|
||||
when the body actually carries it, which is why the client sends the field it changed and a null for
|
||||
the one it did not.</p>
|
||||
when the body actually carries it, which is why the client sends the fields it edited and a null
|
||||
for the rest. The endpoint carries no content hash, so nothing on the server refuses a save that
|
||||
arrives late. After each save the tree relabels the command's node in place rather than rebuilding
|
||||
the branch, which would remount the editor mid-edit.</p>
|
||||
<p>The panel snapshots its command path at mount, and every load and save targets that snapshot
|
||||
rather than the live selection. The path is an index-based entry path which every structural op
|
||||
re-points, so the panel hands the Control Tree host a switch gate that runs before the selection
|
||||
moves off the command and before every mission row op — move, duplicate, delete, drag, Add Command
|
||||
— wherever in the tree that op acts: the gate first lets a save already on the wire land, then
|
||||
sends the edit still waiting in the timer while the path is still the command's own. The gate is
|
||||
there because an op rebuilds the list it rewrites — a drag between two lists rebuilds the nearest
|
||||
list above both — and that rebuild re-mints the build stamp of every node under the rebuilt list.
|
||||
Only one command editor is ever mounted, the selected node's, and its mount key carries that stamp,
|
||||
so the editor remounts when its command sits inside the rebuilt list; the host does not ask whether
|
||||
it does before running the gate — an op in a list that does not hold this command leaves the
|
||||
editor mounted, and its staged edit is flushed all the same. A save that fails refuses the op, and
|
||||
the host drops it with a notice.
|
||||
Unmount cancels the timer instead of flushing it, so no save from a retired instance can land on
|
||||
whichever command has slid into its path. Selection and the tick checkboxes are read-only while a
|
||||
row op is in flight, and equally while a tick's own PUTs are on the wire: the host holds one busy
|
||||
gate for both, so an enable toggle refuses a selection change and ignores further ticks until its
|
||||
writes have landed, exactly as a row op does.</p>
|
||||
<p>NC text is not validated while it is edited: there is no parse at edit time and no error surface on
|
||||
the panel — the server stores whatever string arrives. Errors surface when the mission plays the
|
||||
text.</p>
|
||||
@@ -152,15 +177,35 @@ text.</p>
|
||||
<ul>
|
||||
<li><code>wwwroot-src/src/components/mission/NcCodeCommandPanel.vue</code> — this panel: the Title input, the
|
||||
18-row monospace text area, the 400 ms debounced saves, the live line and character stats, Trim
|
||||
Blank Lines, and Clear behind a confirm dialog.</li>
|
||||
Blank Lines, and Clear behind a confirm dialog; the path snapshot taken at mount, the switch gate
|
||||
that waits for a save on the wire and then drains the timer, and the unmount that cancels rather
|
||||
than flushes.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/MissionCommandSlavePanel.vue</code> — the command node's
|
||||
slave panel: mounts this editor on the entry path, forwards its switch gate to the host, and
|
||||
shows the disabled caption above the title.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/PrimarySlavePanel.vue</code> — mounts the one editor pane, the
|
||||
selected node's, under a key that carries the node's build stamp; a rebuild that re-mints the
|
||||
stamp remounts it.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/ControlTreePanel.vue</code> — the tree rows: the drag handle
|
||||
and the move / duplicate / delete buttons on the command's row, and the Add Command <code>+</code> on the
|
||||
row of its list.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/useControlTreeHost.ts</code> — funnels every selection change
|
||||
and every mission row op through the active panel's switch gate; holds the one busy gate that
|
||||
keeps selection and the tick checkboxes read-only while a row op, or a tick's own PUTs, are in
|
||||
flight; a refused gate drops the op with a notice, and a save relabels the command's node in
|
||||
place.</li>
|
||||
<li><code>wwwroot-src/src/components/controlTree/missionItemTypes.ts</code> — maps the <code>nccode</code> kind to this
|
||||
panel, and states the rule it belongs to: a single-purpose kind embeds its whole editor on the
|
||||
command node.</li>
|
||||
command node; mints the per-build stamp every command node under a rebuilt list carries.</li>
|
||||
<li><code>wwwroot-src/src/api/mission.ts</code> — <code>loadNcCode</code> and <code>setNcCode</code>, and the command shape the panel
|
||||
edits (NC code plus title).</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/mission.ts</code> — the panel's wording: the NC Code label, the character
|
||||
count, Trim Blank Lines, and the line count it shares with the other panels.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/common.ts</code> — the shared strings the panel borrows: the “Title
|
||||
(optional)” label on the Title Field and the Clear button's label.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/dialog.ts</code> — the Clear confirmation's title and message.</li>
|
||||
<li><code>wwwroot-src/src/i18n/en/tree.ts</code> — the disabled caption and the notice a refused gate raises on
|
||||
a row op.</li>
|
||||
<li><code>Missions/MissionController.cs</code> — the single patch PUT for this command, whose NC-code and title
|
||||
fields are each applied when the body carries them, and the command-snapshot arm that returns both
|
||||
back to the panel.</li>
|
||||
@@ -178,9 +223,9 @@ how this command's NC text persists with the project.</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="NcFileCommand-panel.html">NcFileCommand Panel</a> — the other Program command: a path to a file instead of text stored in the project</li>
|
||||
<li><a class="xref" href="NcFileCommand-panel.html">NcFileCommand Panel</a> — the other NC program command among the three kinds the Program catalog category holds (Program File, NC Code, Script): a path to a file instead of text stored in the project</li>
|
||||
<li><a class="xref" href="script-command-panel.html">Script Command Panel</a> — the rich editor this folder does have, and why this command ships a plain text area instead</li>
|
||||
<li><a href="../../../manual/run/playing-a-program.html">Playing a Program</a> — the task these two commands serve</li>
|
||||
<li><a href="../../../manual/run/playing-a-program.html">Playing a Program</a> — the task the two NC program commands, Program File and NC Code, serve; the Script command has its own manual page</li>
|
||||
<li><a href="index.html">Mission</a> — the rest of the command panels</li>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user