Add guarded Text alias rename with complete preview and editor reuse
This commit is contained in:
@@ -2650,6 +2650,45 @@ limits. If sources change, stale rows cannot navigate: run the query again.
|
||||
Navigation MUST preserve the accepted model and every source draft, and select
|
||||
locations in the original UTF-8 bytes. Displayed locations use one-based lines
|
||||
and UTF-8 byte columns.</p>
|
||||
<p><strong>Rename alias</strong> (<span class="docutils literal">F2</span> while the source editor has focus) changes the alias
|
||||
under the caret or its exact selection. It requires a unique authored identity
|
||||
in the complete accepted source bundle, with no pending source, property or
|
||||
behavior drafts and no extra loaded detached files. Accepted but unsaved source
|
||||
is eligible. The operation MUST NOT implicitly apply a draft or allocate an ID.
|
||||
The engineering name and UUID remain unchanged.</p>
|
||||
<p>The <strong>Source alias</strong> field does not trim or normalize the entered alias. Pasting
|
||||
line breaks, tabs or other control characters is explicitly rejected as a whole:
|
||||
the field and its selection remain unchanged, and any previous preview approval
|
||||
is invalidated. <strong>Preview</strong>
|
||||
prepares a typed alias change and displays every changed file and source line;
|
||||
comments, strings, engineering data, file membership and declaration ownership
|
||||
remain unchanged. Enter in the field requests Preview, never confirmation.
|
||||
The preview is for this operation against accepted source, so a later Save may
|
||||
also contain earlier accepted edits. A changing rename requires enough model
|
||||
history capacity to retain its immediate Undo. An invalid, identical, stale or
|
||||
oversized candidate cannot enable confirmation.</p>
|
||||
<p>The preview MUST provide access to all admitted files, hunks, lines and long-line
|
||||
segments. Refuse a candidate whose complete preview exceeds the editor's bounds:
|
||||
256 changed files, 50,000 changed lines or 8 MiB of displayed source bytes
|
||||
(both versions of changed/context lines and file paths). Index metadata is
|
||||
separately bounded to seven retained line records per changed line. These
|
||||
limits do not restrict the language itself. A changed-line count is not a count
|
||||
of semantic references. Cancel, Preview and Rename alias remain reachable
|
||||
outside the independently scrolling source preview.</p>
|
||||
<p>Explicit <strong>Rename alias</strong> confirms the current preview once, as one accepted
|
||||
model/source transaction. A source, document, recovery or replacement change
|
||||
invalidates its approval even if later bytes match the old preview. Closing the
|
||||
form cancels approval; a late worker result MUST NOT reopen it. Rejected,
|
||||
canceled and unchanged operations preserve accepted bytes, drafts, save state,
|
||||
revisions, selection and both histories. Successful rename selects the new alias
|
||||
at the original occurrence rather than the first matching spelling in the file.
|
||||
Editing the replacement permits a new Preview in the same form. After a source
|
||||
context change, close the form and invoke Rename again on the current alias.</p>
|
||||
<p><strong>Undo rename</strong> is guarded against intervening edits and uses model history;
|
||||
the persistent <strong>Undo model</strong> and <strong>Redo model</strong> controls restore the complete
|
||||
accepted snapshots. Text <span class="docutils literal">Ctrl+Z</span> remains <strong>Undo text</strong>. Save is separate and
|
||||
uses the ordinary guarded source-save contract. An unconfirmed preview and Undo
|
||||
history are not persisted on reopening.</p>
|
||||
<p>Changing a graphical UUID must atomically update map keys and every reference.
|
||||
Alias changes preserve UUID identity. Deletion must account for owned elements,
|
||||
incident relationships, ordered occurrences, and diagram placements without
|
||||
|
||||
Reference in New Issue
Block a user