Add frozen TikZRefinery demo baseline and build pipeline
vpn-dns-gateway/pipeline/head This commit looks good
vpn-dns-gateway/pipeline/pr-main This commit looks good

This commit is contained in:
2026-11-25 22:46:33 -05:00
parent 6064cce05e
commit 27b82c169e
456 changed files with 66509 additions and 0 deletions
@@ -0,0 +1,27 @@
# Editable report diagrams
Use [the generated diagram index](../../DIAGRAM_INDEX.md) for every active
figure's editable source, section, UML/view type, current/planned status and
printed/physical pages in both report editions. The report's List of Figures
provides internal navigation. `diagram-index.json` also records source hashes.
Maintain classifications in `documents/diagram-manifest.json`; the complete
`documents/build-report.ps1` build regenerates the index and rejects unclassified
figures. `documents/update-diagram-index.py --build-directory <build-root>` can
refresh it independently from final build records. No PDF text is extracted.
Current diagrams follow 0.1.4-alpha: thirteen host classes, provider interface
and rectangle module, bounded history, sidebar shell and physical/module
deployment. Generic transactions, shared catalogue ownership, wider provider
contracts/lifecycle, creation, labels and overlap selection remain planned.
Source-based views keep `tkrRectangleShapeProvider`; planned views mark the
requested `tkrShapeProviderRectangle` rename. DLL identity is separate.
Historical diagrams are retained outside the active figure index. The former
frozen deployment source is in `../diagram-audit-2026-11-24/`; the old 0.10.3 UI
schematic `current-ui-wireframe.tex` remains historical. Existing submitted decks,
reports, packages and fixtures are not rewritten. These fragments compile through
the full report and do not imply application test execution.
Targeted figure lookup speeds review; it does not replace whole-document impact
and rendered-layout review when design changes or additions affect other content.
@@ -0,0 +1,20 @@
\begin{tikzpicture}
\node[umlClass,text width=6cm,anchor=north] (entry) at (0,0)
{\guillemotleft dataType\guillemotright\\\textbf{ShapeCatalogueEntry}\\\textit{planned offered-type description}
\nodepart{second} family; specific type; readable name\\preview data; creation support
\nodepart{third} No accepted document/element identity};
\node[umlClass,text width=6cm,anchor=north] (host) at (9,0)
{\guillemotleft dataType\guillemotright\\\textbf{Host catalogue association}\\\textit{planned host-owned binding}
\nodepart{second} entry; declared provider ID/version\\runtime provider binding
\nodepart{third} Distinguish alternative implementations};
\node[umlClass,text width=6cm,anchor=north] (element) at (0,-6.2)
{\guillemotleft dataType\guillemotright\\\textbf{ElementDescription}\\\textit{existing instance boundary}
\nodepart{second} document UUID; element ID; revision\\type/schema; geometry; appearance/content
\nodepart{third} New identity follows host acceptance};
\node[umlClass,text width=6cm,anchor=north] (source) at (9,-6.2)
{\guillemotleft dataType\guillemotright\\\textbf{SourceBinding}\\\textit{host/syntax-private boundary}
\nodepart{second} document/revision; source ranges\\syntax context; rewrite information
\nodepart{third} No original byte ranges enter shape input};
\draw[umlComposition] (host.west)--++(-0.6,0) |- node[above,pos=0.7,font=\footnotesize]{entry value} (entry.east);
\draw[umlAssociation] (source.west)--++(-0.6,0) |- node[above,pos=0.7,font=\footnotesize]{host relates} (element.east);
\end{tikzpicture}
@@ -0,0 +1,39 @@
\begin{tikzpicture}
\node[umlDetail] {
\textbf{tkrEditorController}\quad\textit{final; Controller; extends QObject}
\nodepart{second}
\textbf{Responsibilities}\\
Coordinate model, scene, parser, and mapper; perform file I/O.\\
Guard saving against observed external changes; notify the window.\\
Delegate move/resize preparation; coordinate guarded source edits.
\nodepart{third}\ttfamily
\normalfont\textbf{Private attributes}\ttfamily\\
- m\_refDocument: tkrTikzDocument\&\quad\normalfont(non-owning)\ttfamily\\
- m\_refScene: tkrDiagramScene\&\quad\normalfont(non-owning)\ttfamily\\
- m\_parser: tkrTikzParserExplicit\quad\normalfont(owned value)\ttfamily\\
- m\_mapper: tkrCoordinateMapper\quad\normalfont(owned value)\ttfamily\\
- m\_editService: tkrEditService\quad\normalfont(owned value)\ttfamily\\
- m\_comparisonExtent: ComparisonExtent\quad\normalfont(value)\ttfamily\\
- m\_baFileBaseline: QByteArray\quad\normalfont(last open/save bytes)
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public constructor and operations}\ttfamily\\
+ tkrEditorController(document: tkrTikzDocument\&,\\
\hspace*{1em}diagramScene: tkrDiagramScene\&, pParent: QObject* = nullptr)\\
+ openDocument(strFilePath: const QString\&): OperationResult\\
+ saveDocument(): OperationResult\\
+ undo(), redo(): OperationResult\\
+ refreshParsedDocument(): OperationResult\\[3pt]
\normalfont\textbf{Public slots}\ttfamily\\
+ handleDragPreview(dragUpdate: const DragUpdate\&): void\\
+ handleDragCommit(dragUpdate: const DragUpdate\&): void\\
+ cancelDrag(): void\\[3pt]
\normalfont\textbf{Signals}\ttfamily\\
+ documentChanged(): void\\
+ statusChanged(strMessage: const QString\&): void\\[3pt]
\normalfont\textbf{Private operations}\ttfamily\\
- validateDrag(dragUpdate: const DragUpdate\&) const: OperationResult\\
- prepareGesture(dragUpdate: const DragUpdate\&) const: GestureGeometry\\
- rejectDrag(strReason: const QString\&): void\\
- restoreHistory(bRedo: bool): OperationResult
};
\end{tikzpicture}
@@ -0,0 +1,43 @@
\begin{tikzpicture}
\node[umlDetail] {
\textbf{tkrTikzDocument}\quad\textit{final; Model; no base class}
\nodepart{second}
\textbf{Responsibilities}\\
Keep source bytes authoritative; expose document state.\\
Store parsed records for the current revision.\\
Validate a complete coordinate-edit batch before changing source.
\nodepart{third}\ttfamily
\normalfont\textbf{Private attributes}\ttfamily\\
- m\_baSource: QByteArray\quad\normalfont(current bytes)\ttfamily\\
- m\_baSavedSource: QByteArray\quad\normalfont(dirty comparison)\ttfamily\\
- m\_strFilePath: QString\\
- m\_vecElements: QVector<ElementRecord>\\
- m\_uRevision: quint64 = 0\\
- m\_bIsLoaded: bool = false\\
- m\_documentId: QUuid\\
- m\_history: tkrEditHistory
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public operations}\ttfamily\\
+ loadSource(baSource: const QByteArray\&,\\
\hspace*{1em}strFilePath: const QString\&): void\\
+ sourceBytes() const: const QByteArray\&\\
+ filePath() const: const QString\&\\
+ elements() const: const QVector<ElementRecord>\&\\
+ revision() const: quint64\\
+ identity() const: const QUuid\&\\
+ isLoaded() const: bool\\
+ hasUnsavedChanges() const: bool\\
+ markSaved(): void\\
+ setParsedElements(vecElements: const QVector<ElementRecord>\&,\\
\hspace*{1em}uExpectedRevision: quint64): OperationResult\\
+ canUndo(), canRedo() const: bool\\
+ undoDescription(), redoDescription() const: QString\\
+ restoreHistory(bRedo: bool): OperationResult\\
+ applyCoordinateEdits(vecEdits: const QVector<CoordinateEdit>\&,\\
\hspace*{1em}strDescription: const QString\&)\\
\hspace*{1em}: OperationResult\\[3pt]
\normalfont\textbf{Private; controller is a friend}\ttfamily\\
- acceptPreparedState(documentCandidate: tkrTikzDocument\&,\\
\hspace*{1em}uExpectedRevision: quint64): OperationResult
};
\end{tikzpicture}
@@ -0,0 +1,26 @@
\begin{tikzpicture}
\node[umlDetail,text width=16cm] {
\textbf{tkrEditService}\quad\textit{final; GUI-independent support service}
\nodepart{second}
\textbf{Responsibilities}\\
Delegate rectangle geometry to its provider; constrain built-in segments.\\
Validate provider identity, operation invariants and host constraints.\\
Prepare only changed-coordinate replacements with exact decimal addition.\\
Share the parser's stroke envelope; never mutate source, history or widgets.
\nodepart{third}
\textbf{State and dependencies}\\
Stateless; owned by value in \texttt{tkrEditorController}.\\
Borrowed inputs: element, gesture, mapper, extent and source bytes.\\
\texttt{ShapeGeometryLimits}: $0.01$ cm minimum; six-decimal offsets.\\
\texttt{GestureGeometry}: operation result and two TikZ positions.
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public operations}\ttfamily\\
+ prepareGeometry(element: const ElementRecord\&, drag: const DragUpdate\&,\\
\hspace*{1em}mapper: const tkrCoordinateMapper\&, extent: const ComparisonExtent\&,\\
\hspace*{1em}pShapeProvider: const tkrShapeProvider* = nullptr)\\
\hspace*{1em}const: GestureGeometry\\
+ prepareEdits(element: const ElementRecord\&, baSource: const QByteArray\&,\\
\hspace*{1em}geometry: const GestureGeometry\&, vecEdits: QVector<CoordinateEdit>\&)\\
\hspace*{1em}const: OperationResult
};
\end{tikzpicture}
@@ -0,0 +1,23 @@
\begin{tikzpicture}
\node[umlDetail] {
\textbf{tkrEditHistory}\quad\textit{final; Model support; owned by document}
\nodepart{second}\textbf{Responsibilities}\\
Retain exact session snapshots and operation descriptions.\\
Prepare a new entry without losing the existing redo branch on failure.\\
Supply restoration targets; move cursor only through the owning document.
\nodepart{third}\ttfamily
- m\_vecEntries: QVector<Entry>\\
- m\_nCursor: qsizetype = 0\\
\normalfont Entry contains before/after QByteArray and QString description.
\nodepart{fourth}\ttfamily
+ canUndo(), canRedo() const: bool\\
+ undoDescription(), redoDescription() const: QString\\[3pt]
\normalfont\textbf{Private; friend tkrTikzDocument}\ttfamily\\
- record(baBefore, baAfter: const QByteArray\&,\\
\hspace*{1em}strDescription: const QString\&): void\\
- restorationSource(bRedo: bool) const: QByteArray\\
- advance(bRedo: bool): void\\
- clear(): void\\
- swap(historyOther: tkrEditHistory\&): void [noexcept]
};
\end{tikzpicture}
@@ -0,0 +1,25 @@
\begin{tikzpicture}
\node[umlDetail] {
\textbf{tkrCoordinateMapper}\quad\textit{final; Support service; no base class}
\nodepart{second}
\textbf{Responsibilities}\\
Map TikZ centimetres to scene units and provide the inverse mapping.\\
Apply an explicit origin, positive scale, and opposite y-axis direction.\\
Reject invalid configuration before changing the previous mapping.
\nodepart{third}\ttfamily
\normalfont\textbf{Private attributes}\ttfamily\\
- m\_ptSceneOrigin: QPointF = QPointF(200.0, 300.0)\\
- m\_rSceneUnitsPerCentimeter: qreal = 100.0
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public operations}\ttfamily\\
+ configure(ptSceneOrigin: const QPointF\&,\\
\hspace*{1em}rSceneUnitsPerCentimeter: qreal): OperationResult\\
+ mapToScene(ptTikzPosition: const QPointF\&) const: QPointF\\
+ mapToTikz(ptScenePosition: const QPointF\&) const: QPointF\\[4pt]
\normalfont\textbf{Coordinate contract}\\
For origin $(o_x,o_y)$, scale $s$, and TikZ point $(x_t,y_t)$:\\
$x_s=o_x+s x_t$,\quad $y_s=o_y-s y_t$.\\
$x_t=(x_s-o_x)/s$,\quad $y_t=(o_y-y_s)/s$.\\
Viewport pixels, zoom, and pan are outside this mapping.
};
\end{tikzpicture}
@@ -0,0 +1,22 @@
\begin{tikzpicture}
\node[umlDetail] {
\textbf{tkrTikzParserExplicit}\quad\textit{final; Support service; no base class}
\nodepart{second}
\textbf{Responsibilities}\quad\textit{explicit subset parsing}\\
Recognize cm rectangles, lines and default-direction arrows.\\
Identify element geometry and coordinate byte ranges for minimal edits.\\
Reject unsafe contexts; return diagnostics without changing source.
\nodepart{third}
\textbf{Attributes and state}\\
No declared data members. Inputs are borrowed for one parse call.\\
No document, scene, widget, file, or compiler ownership.
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public operation}\ttfamily\\
+ parse(baSource: const QByteArray\&,\\
\hspace*{1em}uDocumentRevision: quint64) const: ParseResult\\[4pt]
\normalfont\textbf{Current result}\\
Safety flag, revision-tagged numeric byte ranges, comparison extent.\\
Unknown syntax: false flag, no records, explanatory diagnostic.\\
Host scene/controller use supported records for guarded gestures.
};
\end{tikzpicture}
@@ -0,0 +1,46 @@
\begin{tikzpicture}
\node[umlDetail,text width=16cm] {
\textbf{tkrDiagramScene}\quad\textit{final; View; extends QGraphicsScene}
\nodepart{second}
\textbf{Responsibilities}\\
Own graphics items through Qt and clear obsolete geometry.\\
Display rectangles and line/arrow outlines using mapper and extent.\\
Emit move/corner gestures; draw screen-sized selection handles.\\
Restore source geometry on cancellation.
\nodepart{third}
\textbf{Attributes and state}\\
Private: \texttt{m\_bFixedBounds: bool}, \texttt{m\_bDragActive: bool},
\texttt{m\_dragUpdate: DragUpdate}.\\
Inherited scene state owns graphics items; no retained item pointers.\\
Owns \texttt{m\_shapePlugins: tkrShapePluginStore} and copied \texttt{m\_mapper: tkrCoordinateMapper}.\\
Source bytes, parsing, and filesystem access remain outside this class.
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public constructor and operations}\ttfamily\\
+ tkrDiagramScene(pParent: QObject* = nullptr,\\
\hspace*{1em}strRectangleModule: const QString\& = \{\}) [explicit]\\
+ displayElements(vecElements: const QVector<ElementRecord>\&,\\
\hspace*{1em}coordinateMapper: const tkrCoordinateMapper\&,\\
\hspace*{1em}comparisonExtent: const ComparisonExtent\& = \{\})\\
\hspace*{1em}: OperationResult\\
+ resetDiagram(): void\\
+ hasFixedBounds(): bool [const]\\
+ previewGeometry(uElementId: quint64, uDocumentRevision: quint64,\\
\hspace*{1em}ptFirstScene: const QPointF\&, ptSecondScene: const QPointF\&,\\
\hspace*{1em}bResize: bool): OperationResult\\
+ selectElement(uElementId: quint64): void\\
+ cancelInteraction(): void\\
+ shapeProvider() const: const tkrShapeProvider*\\
+ pluginDescription() const: QString\\[3pt]
\normalfont\textbf{Protected event overrides}\ttfamily\\
\# drawForeground(pPainter: QPainter*, rectExposed: const QRectF\&): void\\
\# mousePressEvent(pEvent: QGraphicsSceneMouseEvent*): void\\
\# mouseMoveEvent(pEvent: QGraphicsSceneMouseEvent*): void\\
\# mouseReleaseEvent(pEvent: QGraphicsSceneMouseEvent*): void\\
\# keyPressEvent(pEvent: QKeyEvent*): void\\
\# focusOutEvent(pEvent: QFocusEvent*): void\\[3pt]
\normalfont\textbf{Signals}\ttfamily\\
+ dragPreviewRequested(dragUpdate: const DragUpdate\&): void\\
+ dragCommitRequested(dragUpdate: const DragUpdate\&): void\\
+ dragCancelled(): void
};
\end{tikzpicture}
@@ -0,0 +1,23 @@
\begin{tikzpicture}
\node[umlDetail,text width=15cm] {
\textbf{tkrDiagramView}\quad\textit{final; View; extends QGraphicsView}
\nodepart{second}
\textbf{Responsibilities}\\
Fit the scene to the viewport and show fixed editing limits.\\
Paint the background without disturbing item rendering.
\nodepart{third}\ttfamily
\normalfont\textbf{Private attributes}\ttfamily\\
- m\_rectCanvas: QRectF\\
- m\_bFixedBounds: bool = false\\
\normalfont The base view references the scene; it does not own it.
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public operations}\ttfamily\\
+ tkrDiagramView(pScene: QGraphicsScene*, pParent: QWidget* = nullptr)\\
+ setCanvasBounds(rectCanvas: const QRectF\&, bFixedBounds: bool): void\\[3pt]
\normalfont\textbf{Protected overrides}\ttfamily\\
\# drawBackground(pPainter: QPainter*, rectExposed: const QRectF\&): void\\
\# resizeEvent(pEvent: QResizeEvent*): void\\[3pt]
\normalfont\textbf{Private operation}\ttfamily\\
- fitCanvas(): void
};
\end{tikzpicture}
@@ -0,0 +1,33 @@
\begin{tikzpicture}
\node[umlDetail] {
\textbf{tkrMainWindow}\quad\textit{final; View / assembly; extends QMainWindow}
\nodepart{second}
\textbf{Responsibilities}\\
Assemble and own components; connect controls and controller signals.\\
Display read-only source, status, file title, and unsaved-state prompts.\\
Ask the controller to open/save; accept or reject a close request.
\nodepart{third}\ttfamily
\normalfont\textbf{Private attributes}\ttfamily\\
- m\_document: tkrTikzDocument\quad\normalfont(owned value)\ttfamily\\
- m\_pScene: tkrDiagramScene* = nullptr\\
- m\_pView: tkrDiagramView* = nullptr\\
- m\_pSidebar: tkrWorkspaceSidebar* = nullptr\\
- m\_pSourceView: QPlainTextEdit* = nullptr\\
- m\_pSaveAction: QAction* = nullptr\\
- m\_pUndoAction, m\_pRedoAction: QAction* = nullptr\\
- m\_upController: std::unique\_ptr<tkrEditorController>\\
\normalfont\textit{Scene/widgets/actions use QObject parent ownership.}
\nodepart{fourth}\ttfamily
\normalfont\textbf{Public lifetime operations}\ttfamily\\
+ tkrMainWindow(pParent: QWidget* = nullptr,\\
\hspace*{1em}strInitialFilePath: const QString\& = \{\}) [explicit]\\
+ \textasciitilde tkrMainWindow() [override]\\[3pt]
\normalfont\textbf{Protected operation}\ttfamily\\
\# closeEvent(pEvent: QCloseEvent*): void [override]\\[3pt]
\normalfont\textbf{Private operations}\ttfamily\\
- openDocument(): void\\
- saveDocument(): bool\\
- confirmDiscardOrSave(): bool\\
- updateDocumentView(): void
};
\end{tikzpicture}
@@ -0,0 +1,48 @@
% Current implemented classes: structural UML relationships, not message exchange.
\begin{tikzpicture}
\node[umlSummary,text width=5.2cm,anchor=north] (window) at (0,0) {\hyperref[Section:ClassMainWindow]{\textbf{tkrMainWindow}}\\\textit{View / assembly; final}
\nodepart{second} Assemble/own components and sidebar.\\Menus, source, status and dialogs.\\Guard unsaved work.};
\node[umlSummary,text width=5.2cm,anchor=north] (scene) at (15.6,0) {\hyperref[Section:ClassDiagramScene]{\textbf{tkrDiagramScene}}\\\textit{View; final}
\nodepart{second} Own graphics items.\\Display/select; body/corner gestures.\\No source/file mutation.};
\node[umlSummary,text width=5.2cm,anchor=north] (view) at (23.4,0) {\hyperref[Section:ClassDiagramView]{\textbf{tkrDiagramView}}\\\textit{View; final}
\nodepart{second} Fit viewport; paint paper.\\Keep source/scene units unchanged.\\Borrow displayed scene.};
\node[umlSummary,text width=5.2cm,anchor=north] (document) at (0,-5.8) {\hyperref[Section:ClassTikzDocument]{\textbf{tkrTikzDocument}}\\\textit{Model; final}
\nodepart{second} Source/saved bytes and revision.\\Parsed records and dirty state.\\Validate batches; own session history.};
\node[umlSummary,text width=5.2cm,anchor=north] (controller) at (7.8,0) {\hyperref[Section:ClassEditorController]{\textbf{tkrEditorController}}\\\textit{Controller; final}
\nodepart{second} Coordinate model/scene/services.\\Current file reads/guarded save.\\Own parser, mapper, edit service.};
\node[umlSummary,text width=5.2cm,anchor=north] (service) at (23.4,-5.8) {\hyperref[Section:ClassEditService]{\textbf{tkrEditService}}\\\textit{Support; final}
\nodepart{second} Delegate rectangle geometry; validate.\\Prepare coordinate replacements.\\No live model/UI mutation.};
\node[umlSummary,text width=5.2cm,anchor=north] (parser) at (7.8,-5.8) {\hyperref[Section:ClassExplicitTikzParser]{\textbf{tkrTikzParserExplicit}}\\\textit{Support; final}
\nodepart{second} Interpret explicit supported subset.\\Numeric ranges and fixed extent.\\Reject unsupported source contexts.};
\node[umlSummary,text width=5.2cm,anchor=north] (mapper) at (15.6,-5.8) {\hyperref[Section:ClassCoordinateMapper]{\textbf{tkrCoordinateMapper}}\\\textit{Support; final}
\nodepart{second} TikZ cm / scene conversion.\\Origin, scale and inverted y.\\Validate configuration.};
\node[umlQt] (qtw) at (0,1.4) {Qt: QMainWindow};
\node[umlQt] (qtc) at (7.8,1.4) {Qt: QObject};
\node[umlQt] (qts) at (15.6,1.4) {Qt: QGraphicsScene};
\node[umlQt] (qtv) at (23.4,1.4) {Qt: QGraphicsView};
\draw[umlGeneralization] (window.north)--(qtw.south);
\draw[umlGeneralization] (controller.north)--(qtc.south);
\draw[umlGeneralization] (scene.north)--(qts.south);
\draw[umlGeneralization] (view.north)--(qtv.south);
\draw[umlComposition] (window.south)--node[left,font=\footnotesize]{value} (document.north);
\draw[umlComposition] (window.east)--++(0.5,0) |- (controller.west);
\draw[umlComposition] (window.west)--++(-0.9,0) |- (12.8,2.6) -- (12.8,0) -- (scene.north west);
\node[font=\footnotesize] at (7.8,2.9) {scene: Qt parent ownership};
\draw[umlComposition] (window.north west)--++(0,3.5) -| (view.north west);
\node[font=\footnotesize] at (15.6,3.8) {view: owned through widget hierarchy};
\draw[umlAssociation] (controller.east)--++(0.5,0) |- node[above,font=\footnotesize,pos=0.7]{borrows} (scene.west);
\draw[umlAssociation] (view.west)--++(-0.5,0) |- (scene.east);
\draw[umlComposition] (controller.south)--node[right,font=\footnotesize]{value} (parser.north);
\draw[umlComposition] (controller.south east)--++(0,-0.9) -| (mapper.north west);
\draw[umlComposition] (controller.south east)--++(0.35,0) |- (20.6,-4.9) -- (20.6,-5.8) -- (service.north west);
\draw[umlAssociation] (controller.south west)--++(-0.35,0) |- (2.8,-4.8) -- (2.8,-5.8) -- (document.north east);
\draw[umlDependency] (scene.south)--node[right,font=\footnotesize]{mapping} (mapper.north);
\draw[umlDependency] (service.west)--++(-0.5,0) |- (mapper.east);
\node[umlSummary,text width=5.2cm,anchor=north] (store) at (15.6,-10.5) {\hyperref[Section:CurrentProviderClasses]{\textbf{tkrShapePluginStore}}\\\textit{Support; final}
\nodepart{second} Own loader; pin module binding.\\Validate metadata/API/build key.\\Borrow provider interface root.};
\draw[umlComposition] (scene.south east)--++(0.75,0) |- (store.north east);
\node[umlSummary,text width=5.2cm,anchor=north] (history) at (0,-11.3) {\hyperref[Section:ClassEditHistory]{\textbf{tkrEditHistory}}\\\textit{Model support; final}
\nodepart{second} Exact before/after snapshots.\\Descriptions and traversal cursor.\\Document alone records/traverses.};
\draw[umlComposition] (document.south)--node[right,font=\footnotesize]{value} (history.north);
\node[font=\footnotesize,align=center,text width=23cm] at (11.7,-16.5) {Ten core host classes; three sidebar UI classes are linked in \hyperref[Figure:CurrentSidebarClasses]{the shell view}. Provider interface/module are separate. Diamonds identify ownership; dashed arrows show uses. Qt ancestry is outside the project depth limit.};
\end{tikzpicture}
@@ -0,0 +1,30 @@
\begin{tikzpicture}
\node[initial] (start) {};
\node[activity,below=0.35cm of start] (request) {\textbf{tkrMainWindow}\\closeEvent(): cancel preview, then check unsaved changes};
\node[choice,below=0.45cm of request] (dirty) {Dirty?};
\node[activity,below=0.45cm of dirty] (prompt) {\textbf{tkrMainWindow}\\Ask Save / Discard / Cancel};
\node[choice,below=0.45cm of prompt] (choice) {User choice?};
\node[activitySide] (keep) at ([xshift=-5.4cm]choice.center) {Ignore close event; keep document and window open};
\node[final,below=0.4cm of keep] (keepEnd) {};
\node[activity,below=0.45cm of choice] (save) {\textbf{tkrMainWindow / Controller}\\Attempt guarded saveDocument()};
\node[choice,below=0.45cm of save] (saved) {Save succeeded?};
\node[diamond,draw=tkrBlue,minimum size=3mm,inner sep=0pt,fill=white,below=0.55cm of saved] (merge) {};
\node[activity,below=0.45cm of merge] (accept) {\textbf{tkrMainWindow}\\Accept final-window close};
\node[activity,below=0.4cm of accept] (quit) {\textbf{QApplication / main()}\\Exit event loop; destroy stack window and its controller, document/history, then Qt-owned scene/widgets};
\node[final,below=0.35cm of quit] (finish) {};
\draw[flow] (start) -- (request);
\draw[flow] (request) -- (dirty);
\draw[flow] (dirty) -- node[guard,right]{[yes]} (prompt);
\draw[flow] (dirty.east) -- node[guard,above]{[no]} ([xshift=5.4cm]dirty.center) |- (merge.east);
\draw[flow] (prompt) -- (choice);
\draw[flow] (choice) -- node[guard,above]{[Cancel]} (keep);
\draw[flow] (keep) -- (keepEnd);
\draw[flow] (choice.east) -- node[guard,above]{[Discard]} ([xshift=4.0cm]choice.center) |- (merge.east);
\draw[flow] (choice) -- node[guard,right]{[Save]} (save);
\draw[flow] (save) -- (saved);
\draw[flow] (saved.west) -- node[guard,above]{[no]} ([xshift=-3.5cm]saved.center) |- (keep.east);
\draw[flow] (saved) -- node[guard,right]{[yes]} (merge);
\draw[flow] (merge) -- (accept);
\draw[flow] (accept) -- (quit);
\draw[flow] (quit) -- (finish);
\end{tikzpicture}
@@ -0,0 +1,35 @@
\begin{tikzpicture}[font=\footnotesize]
\node[initial] (start) at (0,0) {};
\node[activity,text width=5.4cm] (choose) at (0,-1) {Author chooses a catalogue/provider entry};
\node[choice,text width=2.3cm] (support) at (0,-2.4) {Host support available?};
\node[activitySide,text width=3.4cm] (unavailable) at (7,-2.4) {Explain unavailable creation; preserve source and selection mode};
\node[activity,text width=5.4cm] (gesture) at (0,-4.1) {Activate one-placement tool. Click for defaults or drag opposite corners; provider previews under host constraints};
\node[choice,text width=2.3cm] (cancel) at (0,-5.8) {Escape?};
\node[activitySide,text width=3.4cm] (restore) at (7,-5.8) {Discard preview; preserve source; return to selection};
\node[activity,text width=5.4cm] (prepare) at (0,-7.6) {Provider prepares geometry; host prepares syntax insertion in a supported context};
\node[choice,text width=2.5cm] (prepared) at (0,-9.4) {Preparation succeeds?};
\node[activity,text width=5.4cm] (document) at (0,-11.1) {Document validates the guarded source candidate};
\node[choice,text width=2.3cm] (accepted) at (0,-12.8) {Accepted?};
\node[activitySide,text width=3.4cm] (retry) at (7,-10.2) {Preserve source; explain the completed attempt once; keep creation tool for retry};
\node[activity,text width=5.4cm] (finish) at (0,-14.5) {Assign accepted identity; select new element; return to selection};
\node[final] (end) at (0,-15.8) {};
\node[final] (unavailableEnd) at (10,-2.4) {};
\node[final] (cancelEnd) at (10,-5.8) {};
\draw[flow] (start)--(choose);
\draw[flow] (choose)--(support);
\draw[flow] (support.south)--node[right]{[yes]} (gesture.north);
\draw[flow] (support.east)--node[above]{[no]} (unavailable.west);
\draw[flow] (unavailable.east)--(unavailableEnd);
\draw[flow] (gesture)--(cancel);
\draw[flow] (cancel.east)--node[above]{[yes]} (restore.west);
\draw[flow] (restore.east)--(cancelEnd);
\draw[flow] (cancel.south)--node[right]{[no / complete attempt]} (prepare.north);
\draw[flow] (prepare)--(prepared);
\draw[flow] (prepared.east)--node[above]{[no]} (3.8,-9.4) |- (retry.west);
\draw[flow] (prepared.south)--node[right]{[yes]} (document.north);
\draw[flow] (document)--(accepted);
\draw[flow] (accepted.east)--node[above]{[rejected]} (7,-12.8)--(retry.south);
\draw[flow] (retry.east)--++(2.3,0) |- (gesture.east);
\draw[flow] (accepted.south)--node[right]{[yes]} (finish.north);
\draw[flow] (finish)--(end);
\end{tikzpicture}
@@ -0,0 +1,20 @@
% Current in-process native module detail; the physical view is Figure:AlphaDeployment.
\begin{tikzpicture}[font=\small]
\draw[thick,tkrBlue,fill=tkrBlue!3] (-1.6,1.2) rectangle (15,-14.8);
\draw[tkrBlue] (-1.6,1.2)--(-1.3,1.4)--(15.3,1.4)--(15.3,-14.6)--(15,-14.8);
\draw[tkrBlue] (15,1.2)--(15.3,1.4);
\node[anchor=north west,font=\bfseries,align=left,text width=15cm] at (-1.2,0.65) {\guillemotleft executionEnvironment\guillemotright\ Windows desktop\\Native module boundary / 0.1.4-alpha package};
\node[umlSummary,text width=5.5cm,anchor=north] (host) at (2,-1.2) {\guillemotleft artifact\guillemotright\\\textbf{TikZRefinery.exe}
\nodepart{second} Scene owns tkrShapePluginStore.\\Store owns loader; pins provider.\\Host parses source and accepts edits.};
\node[umlSummary,text width=5.5cm,anchor=north] (module) at (11,-1.2) {\guillemotleft artifact\guillemotright\\\textbf{shape-plugins/tkr\_rectangle.dll}
\nodepart{second} Implements tkrShapeProvider API 1.\\Supplies rectangle display, selection,\\movement and resizing calculations.};
\node[umlSummary,text width=5.5cm,anchor=north] (key) at (2,-6.8) {\guillemotleft artifact\guillemotright\\\textbf{Bundled Qt / MinGW runtime}
\nodepart{second} Matching native build configuration.\\API/data/parameter versions and\\Qt/compiler/platform key are checked.};
\node[umlSummary,text width=5.5cm,anchor=north] (identity) at (11,-6.8) {\guillemotleft artifact\guillemotright\\\textbf{Build identity JSON records}
\nodepart{second} Version, checkpoint and source state.\\Identity is also embedded in executable.\\Folder/title omit checkpoint hashes.};
\draw[umlDependency] (host.east)--++(0.6,0) |- (module.west);
\node[font=\footnotesize,align=center] at (6.5,-2.6) {loads /\\borrows};
\draw[umlDependency] (host.south)--node[left,font=\footnotesize]{uses} (key.north);
\draw[umlDependency] (module.south)--++(0,-0.55)-| (key.north east);
\node[align=center,text width=14cm,font=\footnotesize] at (6.5,-13.6) {One explicit module candidate; no hot replacement or fallback implementation.\\Missing/incompatible support preserves source. Catalogue, updates and creation remain planned.};
\end{tikzpicture}
@@ -0,0 +1,24 @@
\begin{tikzpicture}
\node[umlClass,text width=6.8cm,anchor=north] (api) at (0,0)
{\guillemotleft interface\guillemotright\\\textbf{tkrShapeProvider}
\nodepart{second} Qt Core value records; const methods\\No source or UI ownership
\nodepart{third} + virtual destructor\\+ availableOperations(description)\\+ describePresentation(description)\\+ prepareOperation(request)};
\node[umlClass,text width=6.8cm,anchor=north] (plugin) at (0,-5.8)
{\textbf{tkrRectangleShapeProvider}\\\guillemotleft module\guillemotright\ tkr\_rectangle.dll
\nodepart{second} Stateless; QObject root\\Rectangle presentation and calculations
\nodepart{third} + availableOperations(description)\\+ describePresentation(description)\\+ prepareOperation(request)};
\node[umlClass,text width=6.6cm,anchor=north] (store) at (10,0)
{\textbf{tkrShapePluginStore}
\nodepart{second} Owns QPluginLoader\\Borrows provider; immutable runtime binding
\nodepart{third} + tkrShapePluginStore(path = \{\})\\+ provider()\\+ loadResult()\\+ runtimeIdentity()\\+ description()\\+ modulePath()\\\textit{All accessors const; types in source}};
\node[umlSummary,text width=6.6cm,anchor=north] (scene) at (10,-6.2)
{\textbf{tkrDiagramScene}
\nodepart{second} Owns store by value and graphics via Qt\\Copies mapper calibration\\Draws provider descriptions/handles};
\node[umlSummary,text width=6.6cm,anchor=north] (service) at (10,-10.5)
{\textbf{tkrEditService}
\nodepart{second} Borrows provider for each request\\Validates proposals; prepares source edits\\Document retains acceptance authority};
\draw[umlRealization] (plugin.north)--(api.south);
\draw[umlAssociation] (store.west)--++(-0.6,0) |- node[above,pos=0.7,font=\footnotesize]{borrows} (api.east);
\draw[umlComposition] (scene.north)--(store.south);
\draw[umlDependency] (service.west)--++(-0.8,0) |- (api.south east);
\end{tikzpicture}
@@ -0,0 +1,37 @@
% Implemented 0.1.3-alpha shell; the shared catalogue/service refactor is separate.
\begin{tikzpicture}
\node[umlSummary,text width=7.2cm,anchor=north] (window) at (-6,0) {
\hyperref[Section:ClassMainWindow]{\textbf{tkrMainWindow}}\\\textit{QMainWindow; final}
\nodepart{second} Own sidebar through central Qt widget tree.\\
Resize the outer splitter on width requests.\\
Reuse the existing guarded Open method.};
\node[umlClass,text width=8.0cm,anchor=north] (sidebar) at (6,0) {
\textbf{tkrWorkspaceSidebar}\\\textit{QWidget; final}
\nodepart{second} Collapsed flag; Shapes/Files page; expanded width.\\
Own icon strip, heading and stacked pages.
\nodepart{third} + setCollapsed(bool); isCollapsed()\\
+ activatePage(Page); selectedPage(); expandedWidth()\\
+ setProviderDescription(QString, bool)\\
\textit{Signals:} widthRequested(int); openDocumentRequested()\\
\# resizeEvent(QResizeEvent*) [override]};
\node[umlClass,text width=6.8cm,anchor=north] (palette) at (-6,-8) {
\textbf{tkrShapePalette}\\\textit{QWidget; final}
\nodepart{second} Copy current rectangle provider summary.\\
Show loaded/unavailable status.\\
Creation button remains disabled.
\nodepart{third} + setProviderDescription(QString, bool)\\
\textit{No catalogue or creation operation.}};
\node[umlClass,text width=6.8cm,anchor=north] (files) at (6,-8) {
\textbf{tkrFolderBrowser}\\\textit{QWidget; final}
\nodepart{second} Explain unfinished folder browsing.\\
Offer the existing Open-document flow.\\
Own no folder model or document source.
\nodepart{third} \textit{Signal:} openDocumentRequested()\\
\textit{No working-folder API yet.}};
\draw[umlComposition] (window.east)--++(0.8,0) |- (sidebar.west);
\draw[umlComposition] (sidebar.south west)--++(0,-0.8) -| (palette.north);
\draw[umlComposition] (sidebar.south)--(files.north);
\node[align=center,font=\footnotesize,text width=16cm,anchor=north] at (0,-13.6) {
All three sidebar UI classes inherit QWidget directly. Qt parenting releases the pages with the sidebar/window.\\
The scene still owns its module store; provider summary text is copied, not borrowed.};
\end{tikzpicture}
@@ -0,0 +1,33 @@
\begin{tikzpicture}[x=1cm,y=1cm,font=\small]
\fill[gray!5] (0,0) rectangle (16,8.4);
\draw (0,0) rectangle (16,8.4);
\draw (0,7.5) -- (16,7.5);
\node[anchor=west,font=\small\bfseries] at (0.3,7.95)
{diagram.tex* --- TikZRefinery --- Alpha 0.10.3};
\node[anchor=west] at (0.3,7.1) {File: Open\ldots\quad Save\quad Exit};
\node[anchor=east] at (15.7,7.1) {Help: About};
\node[anchor=west,font=\bfseries] at (0.3,6.65) {Canvas};
\node[anchor=west,font=\bfseries] at (10.2,6.65) {TikZ source (read-only)};
\fill[tkrGray!45] (0.3,0.9) rectangle (9.7,6.3);
\filldraw[fill=white,draw=tkrGray] (0.8,1.35) rectangle (9.2,5.85);
\draw[line width=1pt] (1.7,2.7) rectangle (3.6,4.6);
\draw[line width=1pt] (5.5,2.7) rectangle (7.8,4.9);
\foreach \x/\y in {5.5/2.7,5.5/4.9,7.8/2.7,7.8/4.9}
\filldraw[fill=white,draw=blue,line width=0.8pt]
(\x-0.08,\y-0.08) rectangle (\x+0.08,\y+0.08);
\filldraw[fill=white,draw=tkrGray] (10.1,0.9) rectangle (15.7,6.3);
\node[anchor=north west,align=left,text width=5cm,font=\ttfamily\scriptsize]
at (10.3,6.0) {\% Unrelated source retained\par
\textbackslash begin\{tikzpicture\}\par
\textbackslash draw (0cm,0cm)\par
\quad rectangle (2cm,2cm);\par
\textbackslash draw (4cm,0cm)\par
\quad rectangle (6.4cm,2.3cm);\par
\textbackslash end\{tikzpicture\}};
\node[anchor=south west,align=left,text width=5cm,font=\scriptsize]
at (10.3,1.1) {Accepted graphical edits refresh this pane.\par
Direct source typing is unavailable here.};
\draw (0,0.65) -- (16,0.65);
\node[anchor=west,font=\scriptsize] at (0.3,0.32)
{Status: select and drag an element; Save committed edits.};
\end{tikzpicture}
@@ -0,0 +1,53 @@
% Current 0.1.4-alpha physical deployment. Historical source is retained in audit evidence.
\begin{tikzpicture}[
font=\large,
artifact/.style={draw=tkrBlue,fill=white,align=center,text width=5.8cm,inner sep=6pt,font=\large},
tool/.style={artifact,draw=tkrGray,fill=tkrGray!5,text width=5.7cm,font=\normalsize},
file/.style={artifact,draw=tkrGreen,fill=tkrGreen!5,text width=5.7cm,font=\normalsize},
io/.style={<->,>=Stealth,thick,draw=tkrBlue},
manual/.style={->,>=Stealth,thick,draw=tkrGray},
label/.style={font=\small,fill=none,align=center,inner sep=2pt}
]
% Physical-node outline follows the report's frozen Alpha figure.
\fill[tkrBlue!8] (0,0) rectangle (26,-1.15);
\draw[very thick,tkrBlue] (0,0) rectangle (26,-14.3);
\draw[tkrBlue] (0,0)--(0.35,0.25)--(26.35,0.25)--(26.35,-14.05)--(26,-14.3);
\draw[tkrBlue] (26,0)--(26.35,0.25);
\node[anchor=west,align=left,font=\Large\bfseries,text=tkrBlue] at (0.55,-0.55)
{\guillemotleft device\guillemotright\ Author's computer / Windows x64};
\draw[tkrGray] (0.4,-1.5) rectangle (25.6,-13.9);
\draw[tkrGray] (0.4,-1.5)--(0.6,-1.3)--(25.8,-1.3)--(25.8,-13.7)--(25.6,-13.9);
\draw[tkrGray] (25.6,-1.5)--(25.8,-1.3);
\node[anchor=west,font=\bfseries,text=tkrGray] at (0.8,-1.95)
{\guillemotleft executionEnvironment\guillemotright\ Windows desktop};
\fill[tkrBlue!3] (0.8,-2.55) rectangle (16.8,-12.8);
\draw[thick,tkrBlue] (0.8,-2.55) rectangle (16.8,-12.8);
\node[anchor=west,font=\bfseries,text=tkrBlue] at (1.1,-3)
{Deployed folder: \texttt{0.1.4-alpha/}};
\node[artifact] (exe) at (4.7,-5.3)
{\guillemotleft artifact\guillemotright\\\textbf{TikZRefinery.exe}\\0.1.4-alpha\\Local desktop process};
\node[artifact] (plugin) at (12.7,-5.3)
{\guillemotleft artifact\guillemotright\\\textbf{shape-plugins/}\\\textbf{tkr\_rectangle.dll}\\Rectangle / API 1};
\node[artifact] (runtime) at (4.7,-9.1)
{\guillemotleft artifact\guillemotright\\\textbf{Bundled runtime files}\\Qt + platform plugins\\MinGW runtime DLLs};
\node[artifact] (identity) at (12.7,-9.1)
{\guillemotleft artifact\guillemotright\\\textbf{Build-identity records}\\\texttt{build-info.json}\\\texttt{package-manifest.json}};
\draw[umlDependency] (exe.east)--node[label,above]{loads}(plugin.west);
\draw[umlDependency] (exe.south)--node[label,right]{loads}(runtime.north);
\node[file] (source) at (21.1,-4.65)
{\guillemotleft artifact\guillemotright\\\textbf{Local TikZ source}\\\texttt{.tex} / \texttt{.tikz}};
\draw[io] (exe.north)--(4.7,-3.7)--node[label,above,pos=0.42]{Open / guarded Save}(21.1,-3.7)--(source.north);
\node[tool] (compiler) at (21.1,-7.6)
{\guillemotleft artifact\guillemotright\\\textbf{Installed TinyTeX}\\\texttt{pdflatex} / TikZ packages};
\node[file] (pdf) at (21.1,-10.2)
{\guillemotleft artifact\guillemotright\\\textbf{Compiled PDF}};
\node[tool] (viewer) at (21.1,-12.55)
{\guillemotleft artifact\guillemotright\\\textbf{External PDF viewer}};
\draw[manual] (source.south)--node[label,right]{author compiles\\saved source}(compiler.north);
\draw[manual] (compiler.south)--node[label,right]{produces}(pdf.north);
\draw[manual] (pdf.south)--node[label,right]{author opens}(viewer.north);
\node[align=left,anchor=north west,text width=14.7cm,font=\normalsize,text=tkrGray] at (1.1,-11.05)
{Version and source state are embedded in the executable and retained in JSON.\\Compiler/PDF viewer run separately; no application server is deployed.};
\node[anchor=west,font=\normalsize,text=tkrGray] at (0,-14.85)
{Dashed: runtime dependencies. Solid: local file I/O or the author's manual workflow.};
\end{tikzpicture}
@@ -0,0 +1,37 @@
% Current whole-element interaction; endpoint gestures remain unsupported.
\begin{tikzpicture}
\node[initial] (start) {};
\node[activity,below=0.35cm of start] (begin) {\textbf{Scene / Controller}\\Select element or corner; capture ID, revision and scene position};
\node[activity,below=0.45cm of begin] (preview) {\textbf{Controller / Scene}\\Constrain move/resize preview; keep source and history unchanged};
\node[choice,below=0.45cm of preview] (gesture) {Gesture state?};
\node[activity,activitySide] (restore) at ([xshift=-5.4cm]gesture.center) {Cancel: rebuild scene; preserve source and history};
\node[final,below=0.4cm of restore] (cancelEnd) {};
\node[activity,below=0.45cm of gesture] (prepare) {\textbf{Controller / Edit service}\\Reuse geometry constraints; prepare changed-coordinate decimal edits};
\node[choice,below=0.4cm of prepare] (changed) {Changed coordinates?};
\node[activitySide] (unchanged) at ([xshift=5.4cm]changed.center) {Rebuild and reselect; retain revision, history and redo};
\node[final,below=0.4cm of unchanged] (unchangedEnd) {};
\node[activity,below=0.4cm of changed] (validate) {\textbf{Controller / Parser / Scene / Document}\\Prepare candidate source/history; validate parsed records and display};
\node[choice,below=0.45cm of validate] (valid) {Batch valid?};
\node[activity,activitySide] (rejected) at ([xshift=-5.4cm]valid.center) {Reject edit; preserve source/history; restore geometry and report failure};
\node[final,below=0.4cm of rejected] (rejectEnd) {};
\node[activity,below=0.45cm of valid] (apply) {\textbf{Document}\\Publish prepared source, records and history together; advance revision};
\node[activity,below=0.4cm of apply] (refresh) {\textbf{Controller / Window}\\Retain validated scene; notify source view, dirty state and history actions};
\node[final,below=0.35cm of refresh] (finish) {};
\draw[flow] (start) -- (begin);
\draw[flow] (begin) -- (preview);
\draw[flow] (preview) -- (gesture);
\draw[flow] (gesture.east) -- node[guard,above]{[moving]} ([xshift=5.4cm]gesture.center) |- (preview.east);
\draw[flow] (gesture) -- node[guard,above]{[cancelled]} (restore);
\draw[flow] (restore) -- (cancelEnd);
\draw[flow] (gesture) -- node[guard,right]{[released]} (prepare);
\draw[flow] (prepare) -- (changed);
\draw[flow] (changed.east) -- node[guard,above]{[no]} (unchanged.west);
\draw[flow] (unchanged) -- (unchangedEnd);
\draw[flow] (changed.south) -- node[guard,right]{[yes]} (validate.north);
\draw[flow] (validate) -- (valid);
\draw[flow] (valid) -- node[guard,above]{[no]} (rejected);
\draw[flow] (rejected) -- (rejectEnd);
\draw[flow] (valid) -- node[guard,right]{[yes]} (apply);
\draw[flow] (apply) -- (refresh);
\draw[flow] (refresh) -- (finish);
\end{tikzpicture}
@@ -0,0 +1,28 @@
% Source-based 0.1.4-alpha sequence; candidate is distinct from the live document.
\begin{tikzpicture}[font=\footnotesize,seqLabel/.style={font=\footnotesize,fill=none,align=center,inner sep=2pt}]
\foreach \name/\x/\title in {s/0/{Scene: tkrDiagramScene},c/4.4/{Controller: tkrEditorController},p/8.8/{Candidate: tkrTikzDocument},d/13.2/{Live: tkrTikzDocument},w/17.6/{Window: tkrMainWindow}} {
\node[draw=tkrBlue,fill=tkrBlue!8,text width=3.7cm,align=center,minimum height=0.9cm] (\name) at (\x,0) {\title};
\draw[dashed,gray] (\x,-0.5)--(\x,-14.5);
}
\draw[tkrBlue] (-1.9,-1.0) rectangle (6.4,-3.5);
\node[seqLabel,anchor=west,text=tkrBlue] at (-1.8,-1.3) {loop [pointer moves]};
\draw[flow] (0,-2)--node[seqLabel,above]{preview request}(4.4,-2);
\draw[flow] (4.4,-2.9)--node[seqLabel,above]{constrained geometry}(0,-2.9);
\node[seqLabel,text width=9cm] at (12.5,-2.3) {Preview changes only scene geometry. The edit service delegates rectangle calculation to the loaded provider; source/history stay unchanged.};
\draw[flow] (0,-4.1)--node[seqLabel,above]{release / commit request}(4.4,-4.1);
\draw[tkrBlue] (-1.9,-4.7) rectangle (19.6,-13.9);
\node[seqLabel,anchor=west,text=tkrBlue] at (-1.8,-5.0) {alt [valid changed coordinates]};
\draw[flow] (4.4,-5.8)--node[seqLabel,above]{copy live state; apply edits}(8.8,-5.8);
\node[seqLabel,text width=7.4cm,anchor=west] at (9.0,-6.6) {Candidate records its history entry before publication; prepare parsed records and validate candidate display.};
\draw[flow] (4.4,-7.7)--node[seqLabel,above]{acceptPreparedState(candidate, expectedRevision)}(13.2,-7.7);
\draw[flow,dashed] (13.2,-8.4)--node[seqLabel,above]{publish source, records, history and revision together}(4.4,-8.4);
\draw[flow] (4.4,-9.1)--node[seqLabel,above]{documentChanged(); refresh source, actions and viewport}(17.6,-9.1);
\draw[dashed,tkrBlue] (-1.9,-9.7)--(19.6,-9.7);
\node[seqLabel,anchor=west,text=tkrBlue] at (-1.8,-10.0) {[unchanged coordinates / cancelled gesture]};
\draw[flow] (4.4,-10.8)--node[seqLabel,above]{rebuild / reselect}(0,-10.8);
\node[seqLabel,text width=10cm] at (12,-10.9) {No live publication, revision change or history entry; preserve redo. Cancellation exits before preparing a commit.};
\draw[dashed,tkrBlue] (-1.9,-11.6)--(19.6,-11.6);
\node[seqLabel,anchor=west,text=tkrBlue] at (-1.8,-11.9) {[validation / allocation / acceptance failure]};
\draw[flow] (4.4,-12.7)--node[seqLabel,above]{restore unchanged source geometry}(0,-12.7);
\draw[flow] (4.4,-13.5)--node[seqLabel,above]{report rejection once; preserve live source/history}(17.6,-13.5);
\end{tikzpicture}
@@ -0,0 +1,17 @@
\begin{tikzpicture}[font=\small]
\node[umlSummary,anchor=north] (syntax) at (0,0) {\textbf{Syntax provider}\\\textit{reviewed role; planned API}
\nodepart{second} Interpret supported source/context.\\Bind source; prepare local rewrites.};
\node[umlSummary,anchor=north] (element) at (8,0) {\textbf{Element provider}\\\textit{reviewed role; planned API}
\nodepart{second} Consume interpreted descriptions.\\Describe display, hits and edit intents.};
\node[umlClass,text width=13.9cm,anchor=north] (records) at (4,-4) {\guillemotleft dataType\guillemotright\\\textbf{Shared data records}\\\textit{planned schemas; not behavior classes}
\nodepart{second} ElementDescription: identity/revision/type, geometry, text/appearance\\SourceBinding: provider, source ranges and rewrite information\\AttachmentRecord: revision-scoped host and relative placement\\PresentationDescription: draw/hit geometry, readable description\\AvailableOperations: intent and per-binding constraints
\nodepart{third} No graphics-item pointer or direct mutation authority.\\Document coordinates remain independent of zoom/pan.};
\node[umlSummary,anchor=north] (core) at (0,-12) {\textbf{Core edit service / document}
\nodepart{second} Coordinate and validate proposal.\\Accept source and history atomically.};
\node[umlSummary,anchor=north] (scene) at (8,-12) {\textbf{Scene}
\nodepart{second} Create and own graphics items.\\Display/selection and gesture feedback.};
\draw[umlDependency] (syntax.south) -- ++(0,-0.7) -| (records.north west);
\draw[umlDependency] (element.south) -- ++(0,-0.7) -| (records.north east);
\draw[umlDependency] (core.north) -- ++(0,0.7) -| (records.south west);
\draw[umlDependency] (scene.north) -- ++(0,0.7) -| (records.south east);
\end{tikzpicture}
@@ -0,0 +1,21 @@
% Source-based snapshot restoration; generic transactions have a separate planned view.
\begin{tikzpicture}[font=\footnotesize,seqLabel/.style={font=\footnotesize,fill=none,align=center,inner sep=2pt}]
\foreach \name/\x/\title in {w/0/{Window: tkrMainWindow},c/5/{Controller: tkrEditorController},p/10/{Candidate: tkrTikzDocument},d/15/{Live: tkrTikzDocument}} {
\node[draw=tkrBlue,fill=tkrBlue!8,text width=4.1cm,align=center,minimum height=0.9cm] (\name) at (\x,0) {\title};
\draw[dashed,gray] (\x,-0.5)--(\x,-12.9);
}
\draw[flow] (0,-1.2)--node[seqLabel,above]{Undo / Redo action}(5,-1.2);
\node[seqLabel,text width=4.3cm,anchor=west] at (5.2,-2.0) {Cancel active preview; copy the live document into a candidate.};
\draw[flow] (5,-3.1)--node[seqLabel,above]{restoreHistory(direction)}(10,-3.1);
\node[seqLabel,text width=7cm,anchor=west] at (10.2,-4.0) {Candidate's owned tkrEditHistory supplies exact target bytes and moves only its candidate cursor. Append no new entry.};
\draw[tkrBlue] (-2.2,-5.1) rectangle (17.3,-12.5);
\node[seqLabel,anchor=west,text=tkrBlue] at (-2.1,-5.4) {alt [target available and candidate parse/display validated]};
\draw[flow] (5,-6.3)--node[seqLabel,above]{acceptPreparedState(candidate, expectedRevision)}(15,-6.3);
\draw[flow,dashed] (15,-7.2)--node[seqLabel,above]{source + records + existing history cursor; advance revision}(5,-7.2);
\draw[flow] (5,-8.1)--node[seqLabel,above]{documentChanged()}(0,-8.1);
\node[seqLabel,text width=15cm] at (7.5,-9.0) {Compare source with saved baseline; refresh canvas, source, dirty flag and actions. Write no disk file. Save retains session history; successful Open replaces it.};
\draw[dashed,tkrBlue] (-2.2,-10.0)--(17.3,-10.0);
\node[seqLabel,anchor=west,text=tkrBlue] at (-2.1,-10.3) {[unavailable target / preparation or acceptance failure]};
\draw[flow] (5,-11.2)--node[seqLabel,above]{unchanged result / failure status}(0,-11.2);
\node[seqLabel,text width=15cm] at (7.5,-12.0) {Preserve live source/history/revision. Unavailable actions are disabled; failed restoration reports a reason.};
\end{tikzpicture}
@@ -0,0 +1,21 @@
\begin{tikzpicture}
\node[initial] (start) at (0,0) {};
\node[plannedActivity] (select) at (0,-1) {Select label directly, or select host/label through point or area candidate menu};
\node[plannedActivity] (preview) at (0,-2.6) {Preview requested movement; source/history unchanged; no repeated rejection strip};
\node[choice] (finish) at (0,-4.5) {Completed edit?};
\node[activitySide] (cancel) at (6,-4.5) {Escape/cancel: restore preview; no error or history};
\node[plannedActivity] (plan) at (0,-6.3) {Binding's syntax provider prepares local placement edits; preserve host/shared definitions and attachment};
\node[choice] (accept) at (0,-8.4) {Changed edit accepted?};
\node[activitySide] (reject) at (6,-8.4) {Rejected: show reason.\par Unchanged: no error.\par Keep source/history.};
\node[plannedActivity] (apply) at (0,-10.4) {Document/history publish one atomic change; reparse relationships; refresh canvas};
\node[final] (end) at (0,-11.8) {};
\draw[flow] (start)--(select); \draw[flow] (select)--(preview); \draw[flow] (preview)--(finish);
\draw[flow] (finish.east)--node[guard,above]{[no]}(cancel.west);
\draw[flow] (finish.south)--node[guard,right]{[yes]}(plan.north);
\draw[flow] (plan)--(accept);
\draw[flow] (accept.east)--node[guard,above]{[no]}(reject.west);
\draw[flow] (accept.south)--node[guard,right]{[changed]}(apply.north);
\draw[flow] (apply)--(end);
\draw[flow] (cancel.east)--++(0.8,0)|-(end.east);
\draw[flow] (reject.east)--++(0.6,0)|-(end.east);
\end{tikzpicture}
@@ -0,0 +1,29 @@
% UML package allocation of current classes; arrows are dependencies.
\begin{tikzpicture}[font=\small]
\node[umlPackage,text width=6cm,anchor=north] (view) at (0,0) {\guillemotleft package\guillemotright\ View\\\textbf{Presentation and input}\\[4pt]
\hyperref[Section:ClassMainWindow]{tkrMainWindow}: assembly, controls, source\\
\hyperref[Section:ClassDiagramView]{tkrDiagramView}: fit and paper\\
\hyperref[Section:ClassDiagramScene]{tkrDiagramScene}: items and gestures\\
\hyperref[Section:CurrentSidebarShell]{tkrWorkspaceSidebar}: page/width state\\
\hyperref[Section:CurrentSidebarShell]{tkrShapePalette}: provider status\\
\hyperref[Section:CurrentSidebarShell]{tkrFolderBrowser}: Files/Open shell};
\node[umlPackage,text width=6cm,anchor=north] (controller) at (9,0) {\guillemotleft package\guillemotright\ Controller\\\textbf{Action coordination}\\[4pt]
\hyperref[Section:ClassEditorController]{tkrEditorController}\\Current file I/O and save guards\\Coordinate parse, preview and acceptance};
\node[umlPackage,text width=6cm,anchor=north] (model) at (0,-7.5) {\guillemotleft package\guillemotright\ Model\\\textbf{Authoritative document}\\[4pt]
\hyperref[Section:ClassTikzDocument]{tkrTikzDocument}\\Source/saved bytes, revision, records\\Guarded batches and session restoration; no Widgets\\
\hyperref[Section:ClassEditHistory]{tkrEditHistory}: exact snapshots/cursor};
\node[umlPackage,text width=6cm,anchor=north] (support) at (9,-7.5) {\guillemotleft package\guillemotright\ Support\\\textbf{GUI-independent services}\\[4pt]
\hyperref[Section:ClassExplicitTikzParser]{tkrTikzParserExplicit}: interpret\\
\hyperref[Section:ClassCoordinateMapper]{tkrCoordinateMapper}: convert\\
\hyperref[Section:ClassEditService]{tkrEditService}: delegate/validate/prepare\\
\hyperref[Section:CurrentProviderClasses]{tkrShapePluginStore}: module binding};
\draw[draw=tkrBlue,fill=tkrBlue!4] (view.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[draw=tkrBlue,fill=tkrBlue!4] (controller.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[draw=tkrBlue,fill=tkrBlue!4] (model.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[draw=tkrBlue,fill=tkrBlue!4] (support.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[umlDependency] (view.east)--++(0.8,0) |- (controller.west);
\draw[umlDependency] (view.south)--node[left,font=\footnotesize]{reads state} (model.north);
\draw[umlDependency] (controller.south)--(support.north);
\draw[umlDependency] (controller.south west)--++(0,-2.3) -| (model.north east);
\node[font=\footnotesize,align=center,text width=13cm] at (4.5,-13.2) {Packages express MVC role allocation, not ownership or a C++ namespace change. Lifetime mechanisms remain in the ownership table and class overview.};
\end{tikzpicture}
@@ -0,0 +1,34 @@
\begin{tikzpicture}
\node[initial] (start) {};
\node[activity,below=0.35cm of start] (confirm) {\textbf{tkrMainWindow}\\Confirm Save / Discard / Cancel if dirty};
\node[choice,below=0.45cm of confirm] (continue) {Continue?};
\node[activitySide] (cancel) at ([xshift=-5.4cm]continue.center) {Keep current document and window};
\node[final,below=0.4cm of cancel] (cancelEnd) {};
\node[activity,below=0.45cm of continue] (choose) {\textbf{tkrMainWindow}\\Show file selection dialog};
\node[choice,below=0.45cm of choose] (selected) {File selected?};
\node[activity,below=0.45cm of selected] (read) {\textbf{Controller}\\Open read-only; read source bytes};
\node[choice,below=0.45cm of read] (readok) {Read succeeded?};
\node[activitySide] (failure) at ([xshift=5.4cm]readok.center) {\textbf{tkrMainWindow}\\Show read error; retain previous source and history};
\node[final,below=0.4cm of failure] (failureEnd) {};
\node[activity,below=0.45cm of readok] (load) {\textbf{Document / Controller}\\Cancel preview; load bytes and baseline; assign new document identity; clear history; advance revision};
\node[activity,below=0.4cm of load] (parse) {\textbf{Parser / Scene}\\Display supported elements or clear with diagnostics};
\node[activity,below=0.4cm of parse] (notify) {\textbf{Controller}\\Emit display/diagnostic status and documentChanged};
\node[activity,below=0.4cm of notify] (view) {\textbf{tkrMainWindow}\\Show source; disable Save, Undo and Redo for the new clean document};
\node[final,below=0.35cm of view] (finish) {};
\draw[flow] (start) -- (confirm);
\draw[flow] (confirm) -- (continue);
\draw[flow] (continue) -- node[guard,above]{[no]} (cancel);
\draw[flow] (cancel) -- (cancelEnd);
\draw[flow] (continue) -- node[guard,right]{[yes]} (choose);
\draw[flow] (choose) -- (selected);
\draw[flow] (selected.west) -- node[guard,above]{[no]} ([xshift=-5.4cm]selected.center) |- (cancelEnd.south);
\draw[flow] (selected) -- node[guard,right]{[yes]} (read);
\draw[flow] (read) -- (readok);
\draw[flow] (readok) -- node[guard,above]{[no]} (failure);
\draw[flow] (failure) -- (failureEnd);
\draw[flow] (readok) -- node[guard,right]{[yes]} (load);
\draw[flow] (load) -- (parse);
\draw[flow] (parse) -- (notify);
\draw[flow] (notify) -- (view);
\draw[flow] (view) -- (finish);
\end{tikzpicture}
@@ -0,0 +1,17 @@
\begin{tikzpicture}
\node[umlClass,text width=7cm,anchor=north] (iface) at (0,0) {\guillemotleft interface\guillemotright\\\textbf{tkrShapeProvider}\\\textit{wider planned contract sketch; v1 separate}
\nodepart{second} Stateless borrowed description/request inputs
\nodepart{third} + describePresentation(description)\\+ availableOperations(description, context)\\+ prepareOperation(request): PreparationResult};
\node[umlClass,text width=7cm,anchor=north] (rectangle) at (0,-7.6) {\textbf{tkrShapeProviderRectangle}\\\textit{planned rename and wider contract sketch}
\nodepart{second} Rectangle geometry/presentation rules\\No document or scene ownership
\nodepart{third} + describePresentation(description)\\+ availableOperations(description, context)\\+ prepareOperation(request)};
\node[umlClass,text width=6.5cm,anchor=north] (service) at (10,0) {\textbf{tkrEditService}\\\textit{current class; planned extension}
\nodepart{second} Borrows provider access; source bindings stay host-side
\nodepart{third} + prepare operation/source candidate\\No live source/history/UI mutation};
\node[umlClass,text width=6.5cm,anchor=north] (document) at (10,-7.6) {\textbf{tkrTikzDocument}\\\textit{current class; guarded acceptance}
\nodepart{second} Owns source/revision/saved baseline\\Owns bounded session history\\Generic transactions remain planned
\nodepart{third} + accept guarded source proposal\\Preparation result is not Applied};
\draw[umlRealization] (rectangle.north) -- (iface.south);
\draw[umlDependency] (service.west) -- ++(-0.6,0) |- node[above,font=\footnotesize,pos=0.7]{Strategy} (iface.east);
\draw[umlDependency] (service.south) -- node[right,font=\footnotesize]{candidate validation} (document.north);
\end{tikzpicture}
@@ -0,0 +1,16 @@
\begin{tikzpicture}[font=\small]
\node[umlSummary,text width=5.8cm] (host) at (0,0) {\textbf{Host application}\\\textit{\guillemotleft component\guillemotright\ planned extension}
\nodepart{second} Register/choose providers.\\Own module lifetime and bindings.\\Coordinate requests; accept source.};
\node[umlSummary,text width=5.8cm] (shape) at (9,0) {\textbf{Rectangle plugin}\\\textit{\guillemotleft component\guillemotright\ current; wider API planned}
\nodepart{second} Supply shape presentation and hits.\\Calculate move/resize proposals.\\No document/scene/file mutation.};
\node[umlQt,text width=5.8cm,align=center] (iface) at (4.5,-3.4) {\guillemotleft interface\guillemotright\\Shape provider contract};
\node[umlSummary,text width=5.8cm] (syntax) at (0,-7) {\textbf{Explicit syntax route}\\\textit{\guillemotleft component\guillemotright\ planned delegation}
\nodepart{second} Interpret source and retain bindings.\\Prepare minimal source rewrites.\\Existing parser retained.};
\node[umlSummary,text width=5.8cm] (view) at (9,-7) {\textbf{Scene / view}\\\textit{\guillemotleft component\guillemotright\ current roles}
\nodepart{second} Create and own graphics items.\\Handle input and temporary preview.\\Keep source rewriting outside.};
\draw[umlDependency] (host.south) -- ++(0,-1.1) -| (iface.north west);
\draw[umlRealization] (shape.south) -- ++(0,-1.1) -| (iface.north east);
\draw[umlDependency] (host.south west) -- ++(-0.55,0) |- (syntax.west);
\draw[umlDependency] (view.north) -- ++(0,1.1) -| (iface.south east);
\node[font=\footnotesize,align=center,text width=13cm] at (4.5,-9.5) {Dependencies show use, not execution order. The rectangle module realizes the shape interface. The host retains source acceptance; loader/registry construction is not frozen.};
\end{tikzpicture}
@@ -0,0 +1,29 @@
\begin{tikzpicture}
\node[initial] (start) at (0,0) {};
\node[activity] (discover) at (0,-1) {Discover candidates / staged updates};
\node[activity] (validate) at (0,-2.5) {Validate metadata, API/data/capabilities; resolve explicit choices};
\node[choice] (compatible) at (0,-4.4) {Compatible choice?};
\node[activitySide] (inactive) at (-6.2,-4.4) {Keep candidate inactive; explain; retain working version};
\node[activity] (active) at (0,-6.3) {Activate at safe point; retain while document/gesture/work depends on provider};
\node[activity] (update) at (0,-8) {Update found during session: stage separately and validate};
\node[choice] (used) at (0,-10) {Provider in use?};
\node[activitySide] (notify) at (6.2,-10) {Nonmodal Later / Restart and update; keep active version};
\node[activity] (recheck) at (0,-12) {Recheck unused; safely activate validated update};
\node[choice] (success) at (0,-14) {Activation succeeds?};
\node[activitySide] (failure) at (-6.2,-14) {Retain prior version, source and choices; report reason};
\node[final] (end) at (0,-16) {};
\draw[flow] (start)--(discover);\draw[flow] (discover)--(validate);\draw[flow] (validate)--(compatible);
\draw[flow] (compatible.west)--node[above,font=\footnotesize]{[no]}(inactive.east);
\draw[flow] (compatible.south)--node[right,font=\footnotesize]{[yes]}(active.north);
\draw[flow] (active)--(update);\draw[flow] (update)--(used);
\draw[flow] (used.east)--node[above,font=\footnotesize]{[yes]}(notify.west);
\draw[flow] (used.south)--node[right,font=\footnotesize]{[no]}(recheck.north);
\draw[flow] (recheck)--(success);
\draw[flow] (success.south)--node[right,font=\footnotesize]{[yes]}(end.north);
\draw[flow] (success.west)--node[above,font=\footnotesize]{[no]}(failure.east);
\draw[flow] (failure.south) |- (end.west);
\draw[flow] (notify.east) -- ++(0.8,0) |- (end.east);
\draw[flow] (inactive.west) -- ++(-0.8,0) |- (end.west);
\node[font=\footnotesize,align=left,text width=3.7cm] at (6.2,-13.5) {Deferred: next startup. Restart: normal unsaved-work guard. No live replacement while in use.};
\node[font=\footnotesize,align=left,text width=3.7cm] at (-6.2,-10) {Planned policy only. Staging differs from activation. Distribution and recovery mechanisms remain open.};
\end{tikzpicture}
@@ -0,0 +1,15 @@
\begin{tikzpicture}[font=\small]
\node[umlPackage,text width=6cm,anchor=north] (view) at (0,0) {\guillemotleft package\guillemotright\ View\\\textbf{Presentation/input}\\tkrMainWindow; tkrDiagramView\\tkrDiagramScene; sidebar shells\\\textit{Current roles; wider providers planned}};
\node[umlPackage,text width=6cm,anchor=north] (controller) at (9,0) {\guillemotleft package\guillemotright\ Controller\\\textbf{Coordination}\\tkrEditorController\\Request preparation and source acceptance\\\textit{No shape arithmetic or updater logic}};
\node[umlPackage,text width=6cm,anchor=north] (model) at (0,-5.4) {\guillemotleft package\guillemotright\ Model\\\textbf{Authoritative source}\\tkrTikzDocument\\Guarded source/revision/saved state\\Owned session history\\\textit{Generic transactions remain planned}};
\node[umlPackage,text width=6cm,anchor=north] (services) at (9,-5.4) {\guillemotleft package\guillemotright\ Services/providers\\\textbf{Preparation and interpretation}\\Edit service; syntax route; mapper\\Shape interface and rectangle plugin\\\textit{Loader/registry lifetime is host-owned}};
\draw[draw=tkrBlue,fill=tkrBlue!4] (view.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[draw=tkrBlue,fill=tkrBlue!4] (controller.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[draw=tkrBlue,fill=tkrBlue!4] (model.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[draw=tkrBlue,fill=tkrBlue!4] (services.north west) -- ++(0,0.45) -- ++(2,0) -- ++(0,-0.45);
\draw[umlDependency] (view.east) -- (controller.west);
\draw[umlDependency] (view.south) -- node[left,font=\footnotesize]{reads} (model.north);
\draw[umlDependency] (controller.south) -- (services.north);
\draw[umlDependency] (controller.south west) -- ++(0,-0.4) -| (model.north east);
\draw[umlDependency] (services.west) -- node[above,font=\footnotesize,text width=2cm,align=center]{read-only inputs} (model.east);
\end{tikzpicture}
@@ -0,0 +1,23 @@
\begin{tikzpicture}
\node[umlClass,text width=6.2cm,anchor=north] (element) at (0,0) {\guillemotleft dataType\guillemotright\\\textbf{ElementDescription}
\nodepart{second} documentId; elementId; revision\\shapeFamily; typeId; schemaVersion\\geometry; appearance; content
\nodepart{third} Rectangle geometry: opposite corners\\Document cm; no original byte ranges};
\node[umlClass,text width=6.2cm,anchor=north] (request) at (9,0) {\guillemotleft dataType\guillemotright\\\textbf{ShapeOperationRequest}
\nodepart{second} target identity/revision\\operationId; parameterSchemaVersion\\initial description; parameters; constraints
\nodepart{third} Move: total displacement\\Resize: corner + total displacement};
\node[umlClass,text width=6.2cm,anchor=north] (result) at (0,-6.5) {\guillemotleft dataType\guillemotright\\\textbf{PreparationResult}
\nodepart{second} outcome; proposed interpreted changes\\reason when preparation is unavailable
\nodepart{third} Does not mean source was applied};
\node[umlClass,text width=6.2cm,anchor=north] (status) at (9,-6.5) {\guillemotleft enumeration\guillemotright\\\textbf{PreparationOutcome}
\nodepart{second} PreparedChange\\Unchanged\\CannotPrepare
\nodepart{third} Host acceptance has separate outcomes};
\node[umlClass,text width=6.2cm,anchor=north] (binding) at (0,-12) {\guillemotleft dataType\guillemotright\\\textbf{SourceBinding}
\nodepart{second} document/revision; syntax provider\\source ranges; rewrite information
\nodepart{third} Host/syntax data; outside shape input};
\node[umlClass,text width=6.2cm,anchor=north] (presentation) at (9,-12) {\guillemotleft dataType\guillemotright\\\textbf{PresentationDescription}
\nodepart{second} drawing; selection geometry\\readable name; handle descriptions
\nodepart{third} Exact primitive/handle schema is open};
\draw[umlDependency] (request.west) -- ++(-0.5,0) |- node[above,font=\footnotesize,pos=0.7]{uses initial} (element.east);
\draw[umlDependency] (result.east) -- ++(0.5,0) |- node[above,font=\footnotesize,pos=0.7]{outcome type} (status.west);
\draw[umlDependency] (result.north) -- node[left,font=\footnotesize]{proposed data} (element.south);
\end{tikzpicture}
@@ -0,0 +1,23 @@
\begin{tikzpicture}[font=\footnotesize]
\foreach \n/\x/\t in {s/0/{Scene: tkrDiagramScene},h/3.6/{Service: tkrEditService},p/7.2/{Provider: tkrShapeProvider},y/10.8/{Syntax: proposed role},d/14.4/{Document: tkrTikzDocument}} {
\node[draw=tkrBlue,fill=tkrBlue!6,text width=3.1cm,minimum height=0.85cm,align=center] (\n) at (\x,0) {\t};
\draw[dashed,tkrGray] (\x,-0.4) -- (\x,-13.2);
}
\draw[flow] (0,-1) -- node[above]{gesture request} (3.6,-1);
\draw[flow] (3.6,-1.8) -- node[above]{prepare(request)} (7.2,-1.8);
\draw[umlDependency] (7.2,-2.6) -- node[above]{preparation result} (3.6,-2.6);
\draw[tkrBlue] (-0.8,-3.25) rectangle (15,-12.75);
\node[anchor=west,text=tkrBlue] at (-0.7,-3.45) {alt [preview with prepared geometry]};
\draw[flow] (3.6,-4.2) -- node[above]{temporary geometry only} (0,-4.2);
\draw[dashed,tkrBlue] (-0.8,-4.8) -- (15,-4.8);
\node[anchor=west,text=tkrBlue] at (-0.7,-5.05) {[release with prepared change]};
\draw[flow] (3.6,-5.8) -- node[above]{bound rewrite preparation} (10.8,-5.8);
\draw[umlDependency] (10.8,-6.6) -- node[above]{candidate source proposal} (3.6,-6.6);
\node[draw=tkrBlue,fill=white,align=center] at (3.6,-7.4) {Recheck identity, capabilities,\\constraints and candidate interpretation};
\draw[flow] (3.6,-8.3) -- node[above]{guarded application request} (14.4,-8.3);
\draw[umlDependency] (14.4,-9.1) -- node[above]{Applied / Unchanged / Rejected} (3.6,-9.1);
\draw[flow] (3.6,-9.9) -- node[above]{refresh / restore} (0,-9.9);
\draw[dashed,tkrBlue] (-0.8,-10.5) -- (15,-10.5);
\node[anchor=west,text=tkrBlue] at (-0.7,-10.8) {[cancel / unavailable / unchanged]};
\draw[flow] (3.6,-11.6) -- node[above]{restore; reason only if unavailable} (0,-11.6);
\end{tikzpicture}
@@ -0,0 +1,36 @@
\begin{tikzpicture}
\node[initial] (start) {};
\node[activity,below=0.35cm of start] (cancelPreview) {\textbf{Controller / Scene}\\Cancel an active drag preview};
\node[choice,below=0.35cm of cancelPreview] (loaded) {Document loaded?};
\node[activitySide] (unloaded) at ([xshift=-5.4cm]loaded.center) {Failure: no document is open};
\node[final,below=0.4cm of unloaded] (unloadedEnd) {};
\node[choice,below=0.55cm of loaded] (dirty) {Unsaved changes?};
\node[activitySide] (unchanged) at ([xshift=5.4cm]dirty.center) {Success: no changes to save};
\node[final,below=0.4cm of unchanged] (unchangedEnd) {};
\node[activity,below=0.45cm of dirty] (baseline) {\textbf{Controller}\\Re-read original file; compare with baseline};
\node[choice,below=0.45cm of baseline] (matches) {Read succeeds and baseline matches?};
\node[activity,below=0.45cm of matches] (write) {\textbf{Controller / QSaveFile}\\Disable direct-write fallback; open, write all bytes, commit; stop at first failure};
\node[activitySide] (failed) at ([xshift=-5.4cm]write.center) {Return failure; report read, conflict, or write error; keep source, history and dirty state};
\node[final,below=0.4cm of failed] (failedEnd) {};
\node[choice,below=0.45cm of write] (written) {Write and commit succeeded?};
\node[activity,below=0.45cm of written] (saved) {\textbf{Controller / Document}\\Update baseline; markSaved(); retain history; emit documentChanged};
\node[activity,below=0.4cm of saved] (report) {\textbf{tkrMainWindow}\\Show saved status; refresh dirty flag and Save action};
\node[final,below=0.35cm of report] (finish) {};
\draw[flow] (start) -- (cancelPreview);
\draw[flow] (cancelPreview) -- (loaded);
\draw[flow] (loaded) -- node[guard,above]{[no]} (unloaded);
\draw[flow] (unloaded) -- (unloadedEnd);
\draw[flow] (loaded) -- node[guard,right]{[yes]} (dirty);
\draw[flow] (dirty) -- node[guard,above]{[no]} (unchanged);
\draw[flow] (unchanged) -- (unchangedEnd);
\draw[flow] (dirty) -- node[guard,right]{[yes]} (baseline);
\draw[flow] (baseline) -- (matches);
\draw[flow] (matches.west) -- node[guard,above]{[no]} ([xshift=-5.4cm]matches.center) |- (failed.north);
\draw[flow] (matches) -- node[guard,right]{[yes]} (write);
\draw[flow] (write) -- (written);
\draw[flow] (written.west) -- node[guard,above]{[no]} ([xshift=-3.5cm]written.center) |- (failed.east);
\draw[flow] (failed) -- (failedEnd);
\draw[flow] (written) -- node[guard,right]{[yes]} (saved);
\draw[flow] (saved) -- (report);
\draw[flow] (report) -- (finish);
\end{tikzpicture}
@@ -0,0 +1,36 @@
% Planned composition; all source-based current views remain separate.
\begin{tikzpicture}[font=\small]
\node[umlSummary,text width=5.6cm,anchor=north] (window) at (8,0)
{\textbf{tkrMainWindow}\\\textit{current; planned extension}
\nodepart{second} Own/connect collaborators.\\Retain assembly role.};
\node[umlSummary,text width=5.6cm,anchor=north] (store) at (0,-3.8)
{\textbf{tkrShapePluginStore}\\\textit{planned window ownership}
\nodepart{second} Load compatible modules.\\Retain provider bindings.\\Expose borrowed access.};
\node[umlSummary,text width=5.6cm,anchor=north] (catalogue) at (8,-3.8)
{\textbf{tkrShapeCatalogue}\\\textit{planned service}
\nodepart{second} Maintain offered types.\\Associate provider identity.\\Borrow module store.};
\node[umlSummary,text width=5.6cm,anchor=north] (sidebar) at (16,-3.8)
{\textbf{tkrWorkspaceSidebar}\\\textit{existing shell; planned catalogue access}
\nodepart{second} Own pages; collapse/expand.\\Retain session tab and width.};
\node[umlSummary,text width=5.6cm,anchor=north] (scene) at (0,-7.6)
{\textbf{tkrDiagramScene}\\\textit{planned borrowed access}
\nodepart{second} Own graphics and input.\\Render provider values.};
\node[umlSummary,text width=5.6cm,anchor=north] (palette) at (8,-7.6)
{\textbf{tkrShapePalette}\\\textit{existing shell; planned extension}
\nodepart{second} Display names and previews.\\Emit chosen entry/provider.};
\node[umlSummary,text width=5.6cm,anchor=north] (files) at (16,-7.6)
{\textbf{tkrFolderBrowser}\\\textit{existing shell; planned extension}
\nodepart{second} Display working-folder tree.\\Request guarded opening.};
\draw[umlComposition] (window.south)--(catalogue.north);
\draw[umlComposition] (window.south west)--++(0,-0.7) -| (store.north);
\draw[umlComposition] (window.south east)--++(0,-0.7) -| (sidebar.north);
\draw[umlComposition] (window.west)--++(-8.8,0) |- (scene.west);
\draw[umlComposition] (sidebar.south)--(files.north);
\draw[umlComposition] (sidebar.south west)--++(0,-1.0) -| (palette.north east);
\draw[umlAssociation] (catalogue.west)--node[above,font=\footnotesize]{borrows} (store.east);
\draw[umlAssociation] (scene.north)--node[left,font=\footnotesize]{borrows} (store.south);
\draw[umlAssociation] (palette.north)--node[right,font=\footnotesize]{reads} (catalogue.south);
\node[align=center,font=\footnotesize,text width=19cm] at (8,-11.1)
{Lifetime constraint: release dependent work and views, then catalogue, then store.\\
Existing document/edit-service collaboration is omitted here; exact wiring remains open.};
\end{tikzpicture}
@@ -0,0 +1,24 @@
\begin{tikzpicture}[x=1cm,y=1cm,font=\small]
\filldraw[fill=gray!6] (0,0) rectangle (16,7);
\node[anchor=west,font=\bfseries] at (0.25,6.65) {Planned sidebar -- content collapsed; tabs remain visible};
\draw (0,6.3)--(16,6.3);
\fill[gray!15] (0,0.5) rectangle (0.9,6.3);
\draw[tkrBlue,line width=2pt] (0.05,5.25)--(0.05,6.1);
\draw (0.32,5.86) circle (0.11);
\draw (0.49,5.72) rectangle (0.72,5.95);
\draw (0.24,5.42)--(0.51,5.42)--(0.38,5.65)--cycle;
\draw (0.22,4.5)--(0.22,4.9)--(0.42,4.9)--(0.51,4.78)--(0.73,4.78)--(0.73,4.5)--cycle;
\node[font=\scriptsize] at (0.46,4.23) {Files};
\draw (0.9,0.5)--(0.9,6.3);
\node[anchor=west,font=\bfseries] at (1.2,5.9) {Canvas};
\fill[gray!50] (1.2,0.9) rectangle (11.25,5.5);
\filldraw[fill=white,draw=gray] (3.3,1.3) rectangle (9.15,5.1);
\draw (4.4,2.5) rectangle (6.4,3.5);
\draw (11.6,0.5)--(11.6,6.3);
\node[anchor=west,font=\bfseries] at (11.9,5.9) {TikZ source};
\filldraw[fill=white,draw=gray] (11.9,0.9) rectangle (15.7,5.5);
\node[anchor=north west,font=\ttfamily\scriptsize,align=left,text width=3.2cm] at (12.1,5.2)
{\% Read-only source\\\textbackslash begin\{tikzpicture\}\\\ldots\\\textbackslash end\{tikzpicture\}};
\draw (0,0.5)--(16,0.5);
\node[anchor=west,font=\scriptsize] at (0.25,0.22) {Click a tab to reopen its page. Illustrative icons; exact collapse control remains open.};
\end{tikzpicture}
@@ -0,0 +1,35 @@
% Original illustrative icons, not adopted third-party artwork.
\begin{tikzpicture}[x=1cm,y=1cm,font=\small]
\filldraw[fill=gray!6] (0,0) rectangle (16,7);
\node[anchor=west,font=\bfseries] at (0.25,6.65) {Planned sidebar -- Shapes expanded};
\draw (0,6.3)--(16,6.3);
\fill[gray!15] (0,0.5) rectangle (0.9,6.3);
\draw[tkrBlue,line width=2pt] (0.05,5.25)--(0.05,6.1);
\draw (0.32,5.86) circle (0.11);
\draw (0.49,5.72) rectangle (0.72,5.95);
\draw (0.24,5.42)--(0.51,5.42)--(0.38,5.65)--cycle;
\draw (0.22,4.5)--(0.22,4.9)--(0.42,4.9)--(0.51,4.78)--(0.73,4.78)--(0.73,4.5)--cycle;
\node[font=\scriptsize] at (0.46,4.23) {Files};
\draw (0.9,0.5)--(0.9,6.3);
\node[anchor=west,font=\bfseries] at (1.15,5.9) {Shapes};
\draw[draw=tkrBlue] (1.15,3.7) rectangle (4.05,5.4);
\draw (1.6,4.55) rectangle (2.7,5.05);
\node[anchor=west,font=\footnotesize] at (1.35,4.2) {Rectangle};
\node[anchor=west,font=\scriptsize] at (1.35,3.95) {Example provider A};
\draw (1.15,1.7) rectangle (4.05,3.4);
\draw (1.6,2.6) rectangle (2.7,3.1);
\node[anchor=west,font=\footnotesize] at (1.35,2.2) {Rectangle};
\node[anchor=west,font=\scriptsize] at (1.35,1.95) {Example provider B};
\draw (4.3,0.5)--(4.3,6.3);
\node[anchor=west,font=\bfseries] at (4.6,5.9) {Canvas};
\fill[gray!50] (4.6,0.9) rectangle (11.25,5.5);
\filldraw[fill=white,draw=gray] (5.0,1.3) rectangle (10.85,5.1);
\draw (6.1,2.5) rectangle (8.1,3.5);
\draw (11.6,0.5)--(11.6,6.3);
\node[anchor=west,font=\bfseries] at (11.9,5.9) {TikZ source};
\filldraw[fill=white,draw=gray] (11.9,0.9) rectangle (15.7,5.5);
\node[anchor=north west,font=\ttfamily\scriptsize,align=left,text width=3.2cm] at (12.1,5.2)
{\% Read-only source\\\textbackslash begin\{tikzpicture\}\\\ldots\\\textbackslash end\{tikzpicture\}};
\draw (0,0.5)--(16,0.5);
\node[anchor=west,font=\scriptsize] at (0.25,0.22) {Concept only: browse shapes, then place on the canvas.};
\end{tikzpicture}
@@ -0,0 +1,24 @@
\begin{tikzpicture}[font=\small]
\node[umlPackage,text width=6cm,anchor=north] (view) at (0,0)
{\guillemotleft package\guillemotright\ View\\\textbf{Presentation/input}\\
MainWindow; scene; diagram view\\Sidebar, palette, folder browser shells\\Planned catalogue/creation extensions};
\node[umlPackage,text width=6cm,anchor=north] (control) at (9,0)
{\guillemotleft package\guillemotright\ Controller\\\textbf{Document-action coordination}\\
tkrEditorController\\Coordinate edit/open/save requests\\Window handles existing unsaved prompts};
\node[umlPackage,text width=6cm,anchor=north] (model) at (0,-5.5)
{\guillemotleft package\guillemotright\ Model\\\textbf{Authoritative document}\\
tkrTikzDocument\\Source, revision, accepted identities\\Guarded acceptance; session history\\Generic transaction extension planned};
\node[umlPackage,text width=6cm,anchor=north] (support) at (9,-5.5)
{\guillemotleft package\guillemotright\ Host services/providers\\\textbf{Bounded collaborators}\\
Catalogue; module store; shape provider\\Edit service; syntax route; mapper\\No sidebar layout or file-tree gestures};
\foreach \panelName in {view,control,model,support}
\draw[draw=tkrBlue,fill=tkrBlue!4] (\panelName.north west)--++(0,0.4)--++(2,0)--++(0,-0.4);
\draw[umlDependency] (view.east)--(control.west);
\draw[umlDependency] (view.south)--node[left,font=\footnotesize]{reads} (model.north);
\draw[umlDependency] (control.south)--(support.north);
\draw[umlDependency] (control.south west)--++(0,-0.5) -| (model.north east);
\draw[umlDependency] (view.north)--++(0,0.8)--(13.2,0.8)--(13.2,-4.9)-| (support.north east);
\node[font=\footnotesize,align=center,text width=13cm] at (4.5,-11.3)
{Planned allocation. Window ownership does not make module management a View responsibility.\\
The ownership view records lifetimes separately.};
\end{tikzpicture}
@@ -0,0 +1,42 @@
% Shared styles for project-owned TikZ class and activity diagrams.
\tikzset{
umlSummary/.style={rectangle split,rectangle split parts=2,
rectangle split part align={center,left},draw=tkrBlue,
rectangle split part fill={tkrBlue!12,white},
text width=6.3cm,inner sep=6pt,font=\small,align=left},
umlDetail/.style={rectangle split,rectangle split parts=4,
rectangle split part align={center,left,left,left},draw=tkrBlue,
rectangle split part fill={tkrBlue!12,tkrBlue!4,white,white},
text width=13.7cm,inner sep=6pt,font=\footnotesize,align=left},
umlExchange/.style={<->,>=Stealth,thick,draw=tkrBlue},
mvcBox/.style={draw=tkrBlue,fill=tkrBlue!6,rounded corners=3pt,
text width=5.8cm,inner sep=7pt,font=\small,align=flush left},
mvcModel/.style={mvcBox,draw=tkrGreen,fill=tkrGreen!6},
mvcView/.style={mvcBox,draw=tkrGray,fill=tkrGray!6},
mvcSupport/.style={mvcBox,dashed,fill=white},
umlClass/.style={rectangle split,rectangle split parts=3,
rectangle split part align={center,left,left},draw=tkrBlue,
rectangle split part fill={tkrBlue!12,white,white},
text width=6.2cm,inner sep=5pt,font=\small,align=left},
umlQt/.style={draw=tkrGray,fill=tkrGray!10,minimum width=3.2cm,
minimum height=0.65cm,font=\small},
umlGeneralization/.style={-{Triangle[open,length=3mm,width=3mm]},thick},
umlComposition/.style={{Diamond[fill=tkrBlue,length=3mm,width=2mm]}-,
draw=tkrBlue,thick},
umlAssociation/.style={-{Straight Barb[length=2mm]},thick},
umlDependency/.style={-{Straight Barb[length=2mm]},dashed,draw=tkrGray},
umlRealization/.style={-{Triangle[open,length=3mm,width=3mm]},dashed,draw=tkrBlue,thick},
umlPackage/.style={draw=tkrBlue,fill=tkrBlue!4,align=left,inner sep=8pt,font=\small,minimum height=4.5cm},
activity/.style={draw=tkrBlue,fill=tkrBlue!6,rounded corners=3pt,
text width=6.1cm,align=center,minimum height=0.7cm,
inner sep=4pt,font=\footnotesize},
activitySide/.style={activity,text width=3.0cm,font=\footnotesize},
plannedActivity/.style={activity,fill=tkrBlue!12,dashed},
choice/.style={diamond,draw=tkrBlue,aspect=2.5,align=center,
text width=2.6cm,inner sep=1pt,font=\footnotesize},
initial/.style={circle,fill=black,minimum size=3mm,inner sep=0pt},
final/.style={circle,draw=black,fill=black,double=white,
double distance=1.2pt,minimum size=4mm,inner sep=0pt},
flow/.style={-{Stealth[length=2mm]},thick},
guard/.style={font=\footnotesize,fill=none,inner sep=1.5pt},
}
@@ -0,0 +1,37 @@
% New-edit acceptance only; restoration has a separate sequence panel.
\begin{tikzpicture}[txGuard/.style={font=\footnotesize,fill=none,inner sep=2pt}]
\node[initial] (start) {};
\node[plannedActivity,below=0.3cm of start] (request) {Controller requests a supported new edit};
\node[plannedActivity,below=0.35cm of request] (geometry) {Shape provider prepares interpreted geometry; host checks support and constraints};
\node[plannedActivity,below=0.35cm of geometry] (plan) {Host/syntax route prepares original-source byte edits; source remains unchanged};
\node[choice,below=0.4cm of plan] (changed) {Preparation outcome?};
\node[plannedActivity,text width=3.2cm] (noChange) at ([xshift=-7.1cm]changed.center) {Unchanged or cancelled: no error; preserve redo and source};
\node[final,below=0.3cm of noChange] (noEnd) {};
\node[plannedActivity,text width=3.2cm] (cannot) at ([xshift=7.1cm]changed.center) {Cannot prepare: preserve source/history; report one reason};
\node[final,below=0.3cm of cannot] (cannotEnd) {};
\node[plannedActivity,below=0.4cm of changed] (prepare) {Document validates guards and prepares candidate source plus exact history entry};
\node[choice,below=0.4cm of prepare] (ready) {All preparation succeeds?};
\node[plannedActivity,text width=3.2cm] (reject) at ([xshift=-7.1cm]ready.center) {Rejected: preserve source/history; report one reason};
\node[final,below=0.3cm of reject] (rejectEnd) {};
\node[plannedActivity,below=0.4cm of ready] (commit) {Publish source and history together; advance revision; notify once};
\node[plannedActivity,below=0.35cm of commit] (refresh) {Refresh from accepted source; future compiled view becomes stale};
\node[final,below=0.35cm of refresh] (end) {};
\draw[flow] (start)--(request);
\draw[flow] (request)--(geometry);
\draw[flow] (geometry)--(plan);
\draw[flow] (plan)--(changed);
\draw[flow] (changed.west)--node[txGuard,above,align=center]{[unchanged /\\cancelled]}(noChange.east);
\draw[flow] (noChange)--(noEnd);
\draw[flow] (changed.east)--node[txGuard,above]{[cannot prepare]}(cannot.west);
\draw[flow] (cannot)--(cannotEnd);
\draw[flow] (changed)--node[txGuard,right]{[prepared change]}(prepare);
\draw[flow] (prepare)--(ready);
\draw[flow] (ready.west)--node[txGuard,above]{[no]}(reject.east);
\draw[flow] (reject)--(rejectEnd);
\draw[flow] (ready)--node[txGuard,right]{[yes]}(commit);
\draw[flow] (commit)--(refresh);
\draw[flow] (refresh)--(end);
\node[font=\footnotesize,align=center,text width=12cm,anchor=north] at ([yshift=-0.4cm,xshift=-1.4cm]end.south) {
Future compilation belongs to successful Save, outside this activity.\\
Compiler failure reports diagnostics without reversing accepted source/history.};
\end{tikzpicture}
@@ -0,0 +1,24 @@
\begin{tikzpicture}
\node[umlSummary,anchor=north] (controller) at (0,0) {
\textbf{tkrEditorController}\\\textit{reviewed planned coordination}
\nodepart{second} Request operations; handle results.\\Notify UI; own edit service and file store.};
\node[umlSummary,anchor=north] (service) at (8,0) {
\textbf{tkrEditService}\\\textit{current service; planned extension}
\nodepart{second} Prepare supported candidate edits.\\Read-only snapshot in; proposal/result out.};
\node[umlSummary,anchor=north] (document) at (0,-4.1) {
\textbf{tkrTikzDocument}\\\textit{existing class; bounded history implemented}
\nodepart{second} Own source, revision and saved baseline.\\Accept source/history together.};
\node[umlSummary,anchor=north] (history) at (8,-4.1) {
\textbf{tkrEditHistory}\\\textit{existing session history; broader design sketch}
\nodepart{second} Own exact snapshots and descriptions.\\Supply targets; manage history position.};
\node[umlSummary,anchor=north] (files) at (0,-8.2) {
\textbf{tkrDocumentFileStore}\\\textit{planned new collaborator}
\nodepart{second} Read source; perform guarded writes.\\Return I/O results; no history mutations.};
\node[draw=tkrGray,dashed,align=left,text width=6.2cm,inner sep=6pt,anchor=north,font=\small] at (8,-8.2) {
\textbf{Planned ownership}\\Window owns document/controller.\\Controller owns edit/file services.\\Document owns history.\\[4pt]
SourceEdit and EditTransaction are records.\\Current thirteen-host-class views remain source-based; see the \hyperref[Figure:CurrentClasses]{core overview} and \hyperref[Figure:CurrentSidebarClasses]{sidebar view}.};
\draw[umlComposition] (controller.east) -- ++(0.35,0) |- (service.west);
\draw[umlAssociation] (controller.south) -- node[right,font=\footnotesize]{uses acceptance} (document.north);
\draw[umlComposition] (document.east) -- ++(0.35,0) |- (history.west);
\draw[umlComposition] (controller.west) -- ++(-0.7,0) |- (files.west);
\end{tikzpicture}
@@ -0,0 +1,37 @@
% Reviewed generic operation sketches; bounded history exists, no frozen generic API.
\begin{tikzpicture}
\node[umlClass,text width=9cm,anchor=north] at (0,0) {
\textbf{tkrTikzDocument}\\\textit{existing class; bounded history implemented}
\nodepart{second} Own source, revision, saved baseline and history.\\
Prepare acceptance before publishing source/history together.
\nodepart{third} + applyTransaction(transaction): result\\
+ undo(), redo(): result\\
+ loadSource(...); markSaved(writtenSnapshot)\\
Restore exact bytes; advance revision; append no restoration entry.};
\node[umlClass,text width=9cm,anchor=north] at (11.5,0) {
\textbf{tkrEditService}\\\textit{existing class; planned generic extension}
\nodepart{second} Read-only snapshot and requested intent.\\
Provider supplies geometry; host/syntax route prepares byte edits.\\
No live source, history, file or widget mutation.
\nodepart{third} + prepareEdit(snapshot, request): proposalResult\\
Prepare candidate and supported-operation checks.};
\node[umlClass,text width=9cm,anchor=north] at (0,-8) {
\textbf{tkrEditHistory}\\\textit{existing session history; broader design sketch}
\nodepart{second} - entries: exact before/after bytes and descriptions\\
- position: current history cursor
\nodepart{third} + prepare entry; retrieve undo/redo target\\
+ complete accepted change/restoration; reset\\
+ query availability/description\\
Document coordinates publication; failure moves no cursor.};
\node[umlClass,text width=9cm,anchor=north] at (11.5,-8) {
\textbf{tkrDocumentFileStore}\\\textit{planned new class; owned by controller}
\nodepart{second} Path, source bytes and expected disk baseline.\\
No edit planning or history state.
\nodepart{third} + read(path): readResult\\
+ write(path, bytes, baseline): writeResult\\
Successful I/O permits document load/baseline update.\\
Save keeps history; successful document replacement clears it.};
\node[font=\footnotesize,align=center,text width=20cm,anchor=north] at (5.75,-15.2) {
Reviewed design; bounded history exists; file store/generic transactions remain planned. No automatic eviction; future limits and provider-dependent retained work remain open.\\
Exact C++ signatures and construction mechanisms require implementation review.};
\end{tikzpicture}
@@ -0,0 +1,48 @@
% Reviewed generic UML interactions; bounded coordinate-edit history is implemented.
\begin{tikzpicture}[font=\footnotesize,txLabel/.style={font=\footnotesize,fill=none,inner sep=2pt,align=center}]
\node[anchor=west,font=\small\bfseries] at (-1.5,0.9) {(a) New edit: prepare and accept};
\foreach \n/\x/\title in {c/0/{Controller: tkrEditorController},e/4.5/{Service: tkrEditService},d/9/{Document: tkrTikzDocument},h/13.5/{History: tkrEditHistory}} {
\node[draw=tkrBlue,fill=tkrBlue!8,text width=3.6cm,align=center,minimum height=0.85cm] (\n) at (\x,0) {\title};
\draw[dashed,gray] (\x,-0.35)--(\x,-4.7);
\draw[dashed,gray] (\x,-6.85)--(\x,-7.4);
}
\draw[flow] (0,-1)--node[txLabel,above]{snapshot + request}(4.5,-1);
\draw[flow,dashed] (4.5,-1.9)--node[txLabel,above]{prepared proposal}(0,-1.9);
\draw[flow] (0,-2.8)--node[txLabel,above]{applyTransaction(proposal)}(9,-2.8);
\draw[flow] (9,-3.7)--node[txLabel,above]{prepare entry}(13.5,-3.7);
\draw[flow,dashed] (13.5,-4.4)--node[txLabel,above]{prepared / failed}(9,-4.4);
\draw[tkrBlue] (-1.5,-4.85) rectangle (15,-6.7);
\node[anchor=west] at (-1.35,-5.05) {alt [valid changed proposal; all preparation ready]};
\node[txLabel] at (9.0,-5.65) {Publish source + history entry atomically; advance revision.};
\draw[dashed,tkrBlue] (-1.5,-6.0)--(15,-6.0);
\node[anchor=west] at (-1.35,-6.3) {[unchanged / cancelled / rejected]: preserve source/history; retain redo};
\draw[flow,dashed] (9,-7.2)--node[txLabel,above]{result; refresh/notify once only after Applied}(0,-7.2);
\node[txLabel,text width=15.5cm,anchor=north] at (6.75,-7.7) {Only a prepared change proceeds to document acceptance; earlier noncommits return directly. Geometry and syntax preparation are detailed in Figure~\ref{Figure:PluginSequence}.};
\end{tikzpicture}
\vspace{0.7cm}
\begin{tikzpicture}[font=\footnotesize,txLabel/.style={font=\footnotesize,fill=none,inner sep=2pt,align=center}]
\node[anchor=west,font=\small\bfseries] at (-1.5,0.9) {(b) Undo or Redo: restore an existing history target};
\foreach \n/\x/\title in {c/0/{Controller: tkrEditorController},d/6.75/{Document: tkrTikzDocument},h/13.5/{History: tkrEditHistory}} {
\node[draw=tkrBlue,fill=tkrBlue!8,text width=3.6cm,align=center,minimum height=0.85cm] (\n) at (\x,0) {\title};
\draw[dashed,gray] (\x,-0.35)--(\x,-4.0);
\draw[dashed,gray] (\x,-7.7)--(\x,-8.5);
}
\draw[flow] (0,-0.8)--(1,-0.8)--(1,-1.35)--(0,-1.35);
\node[txLabel,text width=3.7cm,anchor=west] at (1.1,-1.05) {Cancel active preview before requesting restoration.};
\draw[flow] (0,-2)--node[txLabel,above]{undo() / redo()}(6.75,-2);
\draw[flow] (6.75,-2.9)--node[txLabel,above]{retrieve available target}(13.5,-2.9);
\draw[flow,dashed] (13.5,-3.7)--node[txLabel,above]{exact bytes + target position}(6.75,-3.7);
\draw[tkrBlue] (-1.5,-4.15) rectangle (15,-7.55);
\node[anchor=west] at (-1.35,-4.4) {alt [available target; restoration preparation succeeds]};
\node[txLabel,text width=14cm] at (6.75,-5.25) {Prepare source and validate restoration before publication.\\
Publish exact source + existing history position atomically; advance revision.\\
Compare with saved baseline; append no edit entry and write no disk file.};
\draw[dashed,tkrBlue] (-1.5,-6.1)--(15,-6.1);
\node[anchor=west] at (-1.35,-6.4) {[unavailable / preparation failed]};
\node[txLabel,text width=14cm] at (6.75,-7.0) {Preserve source, entries and position. Disable unavailable action; report failed restoration.};
\draw[flow,dashed] (6.75,-8.25)--node[txLabel,above]{result; refresh/notify once only after Applied}(0,-8.25);
\node[txLabel,text width=15.5cm,anchor=north] at (6.75,-8.8) {Future compiled view becomes stale after restoration; only successful Save requests compilation.\\
Save keeps history; successful document replacement clears it. Compiler failure does not reverse accepted restoration.};
\end{tikzpicture}