\chapter{Use Cases}\ChapterLabel{UseCases} \index{use case}\index{source synchronization} The following \glspl{usecase} translate the provisional stories and requirements into an initial workflow. Full product acceptance remains pending; bounded whole-element editing evidence is recorded in Section~\ref{Section:WholeElementDragCheck}. The October review added planned label and overlap-selection goals. Rectangle provider API v1 is implemented; wider provider choice, updates and creation are planned. The transaction/history behavior and architecture were agreed with Vincent beginning October 22, 2026. Bounded session history is implemented for coordinate edits (Section~\ref{Section:SessionHistoryCheck}); generic transactions and integrated compilation remain future. Broader design diagrams are in Section~\ref{Section:TransactionDesign} and Figure~\ref{Figure:TransactionSequence}. The selection-and-move gesture in \UseCaseRef{UC-002} reflects Vincent's recollection and awaits stakeholder confirmation. The course pattern of stable IDs, a boundary overview, and one specification table per use case is retained. Following Milestone 1 feedback reported by Vincent, it is adapted with a focused TikZ diagram for each goal and reciprocal links between diagrams and specifications. These are proposed actor-goal views, distinct from the source-based activity diagrams in \AppendixRef{DesignDocuments}. \input{../assets/use-case-diagrams/styles.tex} \section{High-Level Use-Case Diagram} The nine goals share one primary actor, the TikZ author. A compact boundary diagram gives an overview of the workflow; the tables below define each interaction and its alternatives. Select a goal in the diagram to jump to its specification table. Each table also links to this overview and its own focused diagram. Provider choice and update handling are planned goals; creation is a later workflow. The actor remains the TikZ author. These additions do not claim an installer, updater, palette or creation implementation. \index{use case diagram} \begin{figure}[htbp] \centering \begin{tikzpicture}[font=\small] \draw[rounded corners=2pt,draw=tkrBlue,thick] (2,-11.2) rectangle (14.2,1.2); \node[anchor=west,font=\bfseries,text=tkrBlue] at (2.3,0.7) {TikZRefinery}; \node[ucActor,align=center] (author) at (-1,-5) {\guillemotleft actor\guillemotright\\TikZ author}; \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal1) at (8.1,-1.2) {\hyperref[UseCase:UC-001]{UC-001 Open and preview a diagram}}; \draw[ucAssociation] (author.east) -- (0.39,-5) |- (goal1.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal2) at (8.1,-2.4) {\hyperref[UseCase:UC-002]{UC-002 Move or resize an object}}; \draw[ucAssociation] (author.east) -- (0.53,-5) |- (goal2.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal3) at (8.1,-3.5999999999999996) {\hyperref[UseCase:UC-003]{UC-003 Save revised source}}; \draw[ucAssociation] (author.east) -- (0.67,-5) |- (goal3.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal4) at (8.1,-4.8) {\hyperref[UseCase:UC-004]{UC-004 Undo or redo an edit}}; \draw[ucAssociation] (author.east) -- (0.81,-5) |- (goal4.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal5) at (8.1,-6.0) {\hyperref[UseCase:UC-005]{UC-005 Reposition an attached label}}; \draw[ucAssociation] (author.east) -- (0.9500000000000001,-5) |- (goal5.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal6) at (8.1,-7.199999999999999) {\hyperref[UseCase:UC-006]{UC-006 Select an obscured element}}; \draw[ucAssociation] (author.east) -- (1.09,-5) |- (goal6.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal7) at (8.1,-8.4) {\hyperref[UseCase:UC-007]{UC-007 Choose a plugin/provider}}; \draw[ucAssociation] (author.east) -- (1.23,-5) |- (goal7.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal8) at (8.1,-9.6) {\hyperref[UseCase:UC-008]{UC-008 Handle a plugin update}}; \draw[ucAssociation] (author.east) -- (1.37,-5) |- (goal8.west); \node[ucGoal,text width=7.0cm,minimum height=0.7cm] (goal9) at (8.1,-10.799999999999999) {\hyperref[UseCase:UC-009]{UC-009 Create using a plugin shape}}; \draw[ucAssociation] (author.east) -- (1.5100000000000002,-5) |- (goal9.west); \end{tikzpicture} \caption[Use-case goals overview]{Provisional actor and use-case overview.\label{Figure:UseCaseDiagram}} \end{figure} \clearpage \section{Open and Preview a Diagram} \begin{tabularx}{\linewidth}{L{3.5cm}Y} \caption{Proposed UC-001 Specification\label{Table:UC-001}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-001}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview (Figure~\ref*{Figure:UseCaseDiagram})}; \hyperref[Figure:UC001Diagram]{focused diagram (Figure~\ref*{Figure:UC001Diagram})}\\ \textbf{Mapped stories} & \UserStoryRef{US-001}, \UserStoryRef{US-002}, \UserStoryRef{US-004}, \UserStoryRef{US-005}, \UserStoryRef{US-006}, \UserStoryRef{US-007}, \UserStoryRef{US-008}, \UserStoryRef{US-009}, \UserStoryRef{US-010}, \UserStoryRef{US-011}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-F-001}, \RequirementRef{REQ-F-002}, \RequirementRef{REQ-F-005}, \RequirementRef{REQ-F-007}, \RequirementRef{REQ-F-008}, \RequirementRef{REQ-F-017}, \RequirementRef{REQ-F-018}, \RequirementRef{REQ-F-020}, \RequirementRef{REQ-F-032}, \RequirementRef{REQ-I-017}, \RequirementRef{REQ-I-018}, \RequirementRef{REQ-I-019}, \RequirementRef{REQ-I-020}, \RequirementRef{REQ-S-001}, \RequirementRef{REQ-A-001}, \RequirementRef{REQ-A-002}, \RequirementRef{REQ-A-003}, \RequirementRef{REQ-A-004}, \RequirementRef{REQ-A-009}, \RequirementRef{REQ-A-014}, \RequirementRef{REQ-A-015}, \RequirementRef{REQ-C-001}\\ \textbf{Goal} & Open a local TikZ document and see its rendered diagram.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & A readable local source file and a configured local LaTeX toolchain are available.\\ \textbf{Trigger} & The author chooses a source file through Open or the planned Files page. Folder selection and activation details remain open.\\ \textbf{Main flow} & Every opening entry point passes through the same Save, Discard and Cancel guard before replacing the current document. The application reads the file, prepares its supported dependencies in a temporary workspace, invokes the configured compiler outside the UI thread, and displays the generated preview.\\ \textbf{Alternate flow} & If compilation fails, the application presents diagnostics and retains the source for correction. Any last successful preview remains visible and is marked as a prior successful result. Missing or incompatible providers preserve source and identify unavailable support without substitution. A read-only compiled fallback is conditional on future compiler integration and available LaTeX dependencies.\\ \textbf{Postconditions} & A preview or explicit failure state is displayed; the input file is unchanged.\\ \bottomrule \end{tabularx} \clearpage \subsection{UC-001 Diagram} \index{use case diagram!UC-001} The association connects the TikZ author to the goal. Dotted connectors attach explanatory notes; they are not control-flow or \texttt{include}/\texttt{extend} relationships. The goal and caption link back to the specification. \begin{figure}[htbp] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-001-open.tex}} \caption[UC-001: Open and preview]{Proposed actor-goal view for \UseCaseRef{UC-001}: opening and previewing. See the \hyperref[Figure:UseCaseDiagram]{overview} for all nine goals. \label{Figure:UC001Diagram}} \end{figure} \clearpage \section{Move or Resize a Supported Object} % Local table size keeps the caption and final rows together. \begingroup\small \begin{tabularx}{\linewidth}{L{3.5cm}Y} \caption{Proposed UC-002 Specification\label{Table:UC-002}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-002}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview (Figure~\ref*{Figure:UseCaseDiagram})}; \hyperref[Figure:UC002Diagram]{focused diagram (Figure~\ref*{Figure:UC002Diagram})}; \hyperref[Figure:DragSequence]{prototype drag sequence}\\ \textbf{Mapped stories} & \UserStoryRef{US-001}, \UserStoryRef{US-002}, \UserStoryRef{US-003}, \UserStoryRef{US-004}, \UserStoryRef{US-005}, \UserStoryRef{US-006}, \UserStoryRef{US-007}, \UserStoryRef{US-008}, \UserStoryRef{US-009}, \UserStoryRef{US-010}, \UserStoryRef{US-011}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-B-001}, \RequirementRef{REQ-F-003}, \RequirementRef{REQ-F-004}, \RequirementRef{REQ-F-005}, \RequirementRef{REQ-F-007}, \RequirementRef{REQ-F-009}, \RequirementRef{REQ-F-010}, \RequirementRef{REQ-F-011}, \RequirementRef{REQ-F-015}, \RequirementRef{REQ-F-022}, \RequirementRef{REQ-F-025}, \RequirementRef{REQ-F-027}, \RequirementRef{REQ-F-032}, \RequirementRef{REQ-D-001}, \RequirementRef{REQ-D-002}, \RequirementRef{REQ-D-003}, \RequirementRef{REQ-D-004}, \RequirementRef{REQ-D-008}, \RequirementRef{REQ-D-009}, \RequirementRef{REQ-D-010}, \RequirementRef{REQ-D-013}, \RequirementRef{REQ-D-014}, \RequirementRef{REQ-D-015}, \RequirementRef{REQ-I-001}, \RequirementRef{REQ-I-003}, \RequirementRef{REQ-I-004}, \RequirementRef{REQ-I-006}, \RequirementRef{REQ-I-007}, \RequirementRef{REQ-I-011}, \RequirementRef{REQ-I-012}, \RequirementRef{REQ-I-013}, \RequirementRef{REQ-I-014}, \RequirementRef{REQ-A-001}, \RequirementRef{REQ-A-004}, \RequirementRef{REQ-A-006}, \RequirementRef{REQ-A-007}, \RequirementRef{REQ-A-008}, \RequirementRef{REQ-A-009}, \RequirementRef{REQ-A-010}, \RequirementRef{REQ-A-011}, \RequirementRef{REQ-A-012}, \RequirementRef{REQ-A-013}, \RequirementRef{REQ-A-015}, \RequirementRef{REQ-A-016}, \RequirementRef{REQ-A-017}, \RequirementRef{REQ-A-018}, \RequirementRef{REQ-A-021}, \RequirementRef{REQ-A-023}, \RequirementRef{REQ-A-024}, \RequirementRef{REQ-P-001}, \RequirementRef{REQ-C-001}\\ \textbf{Goal} & Adjust a supported object's position or rectangle dimensions through the graphical view while retaining editable source.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & A document is open and the target object belongs to the documented editable TikZ subset.\\ \textbf{Trigger} & The author selects a supported object directly or through \UseCaseRef{UC-006}, then drags its body or an available edit handle.\\ \textbf{Main flow} & The editor maps the object to source, previews the gesture, then updates only the needed coordinates. A body drag translates the whole object. An endpoint drag moves one endpoint. A box handle changes its dimensions. Attached labels follow their host. Independent label movement follows \UseCaseRef{UC-005}. The fitted canvas shows any fixed edge and repaints cleanly. Zoom preserves coordinates. The host routes preparation to the bound providers and rechecks available operations before acceptance. Future background compilation follows successful Save, not drag pauses or release.\\ \textbf{Alternate flow} & Preview and release use the same constrained result: stop at a fixed edge, retain the minimum rectangle size, and allow corner crossing (\RequirementRef{REQ-I-013}). Ambiguous mapping blocks the edit with a reason. A later compilation failure reports diagnostics.\\ \textbf{Postconditions} & The canvas follows accepted source. Rejection preserves source. A later compilation failure preserves accepted source and history and marks the preview status.\\ \bottomrule \end{tabularx} \endgroup \clearpage \subsection{UC-002 Diagram} \index{use case diagram!UC-002} The notes summarize the existing specification's supported gestures and unmappable-source alternative. They annotate one goal rather than introduce additional use cases. This view describes the full proposed behavior; bounded whole-element editing is implemented; this increment adds corner resizing. Endpoint gestures and integrated preview remain pending. \begin{figure}[htbp] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-002-move.tex}} \caption[UC-002: Move or resize]{Proposed actor-goal view for \UseCaseRef{UC-002}: editing supported geometry while preserving source. See the \hyperref[Figure:UseCaseDiagram]{overview} for all nine goals. \label{Figure:UC002Diagram}} \end{figure} \clearpage \section{Save Revised Source} \begin{tabularx}{\linewidth}{L{3.5cm}Y} \caption{Proposed UC-003 Specification\label{Table:UC-003}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-003}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview (Figure~\ref*{Figure:UseCaseDiagram})}; \hyperref[Figure:UC003Diagram]{focused diagram (Figure~\ref*{Figure:UC003Diagram})}\\ \textbf{Mapped stories} & \UserStoryRef{US-003}, \UserStoryRef{US-005}, \UserStoryRef{US-006}, \UserStoryRef{US-007}, \UserStoryRef{US-009}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-B-002}, \RequirementRef{REQ-F-006}, \RequirementRef{REQ-F-016}, \RequirementRef{REQ-F-018}, \RequirementRef{REQ-D-001}, \RequirementRef{REQ-D-005}, \RequirementRef{REQ-D-006}, \RequirementRef{REQ-D-011}, \RequirementRef{REQ-A-013}, \RequirementRef{REQ-A-014}, \RequirementRef{REQ-C-001}\\ \textbf{Goal} & Retain an approved graphical edit as local TikZ source.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & A revised source document is open for review.\\ \textbf{Trigger} & The author chooses to save the revision.\\ \textbf{Main flow} & The application writes the reviewed source locally and reports that the save succeeded. When integrated compilation exists, queue compilation of those saved bytes; show readiness/failure without undoing the save.\\ \textbf{Alternate flow} & If the write fails, the application reports the failure and keeps the unsaved revision available.\\ \textbf{Postconditions} & A successful save can be reopened and compiled with the local toolchain; after failure, the unsaved revision remains available.\\ \bottomrule \end{tabularx} \clearpage \subsection{UC-003 Diagram} \index{use case diagram!UC-003} The notes summarize the save goal and its failure outcome. Reopening and external compilation describe the successful source file's intended usability. Compilation is manual today; planned background integration follows successful Save under \RequirementRef{REQ-P-001} and remains outside the current save path. \begin{figure}[htbp] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-003-save.tex}} \caption[UC-003: Save source]{Proposed actor-goal view for \UseCaseRef{UC-003}: saving revised source. See the \hyperref[Figure:UseCaseDiagram]{overview} for all nine goals. \label{Figure:UC003Diagram}} \end{figure} \clearpage \section{Undo or Redo an Edit} \begin{tabularx}{\linewidth}{L{3.5cm}Y} \caption{Proposed UC-004 Specification\label{Table:UC-004}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-004}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview (Figure~\ref*{Figure:UseCaseDiagram})}; \hyperref[Figure:UC004Diagram]{focused diagram (Figure~\ref*{Figure:UC004Diagram})}; \hyperref[Figure:HistorySequence]{current restoration sequence}\\ \textbf{Mapped stories} & \UserStoryRef{US-004}, \UserStoryRef{US-005}, \UserStoryRef{US-007}, \UserStoryRef{US-008}, \UserStoryRef{US-009}, \UserStoryRef{US-011}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-F-007}, \RequirementRef{REQ-F-012}, \RequirementRef{REQ-F-013}, \RequirementRef{REQ-F-014}, \RequirementRef{REQ-F-015}, \RequirementRef{REQ-F-016}, \RequirementRef{REQ-F-017}, \RequirementRef{REQ-F-018}, \RequirementRef{REQ-F-019}, \RequirementRef{REQ-F-020}, \RequirementRef{REQ-D-002}, \RequirementRef{REQ-D-003}, \RequirementRef{REQ-D-004}, \RequirementRef{REQ-D-005}, \RequirementRef{REQ-D-006}, \RequirementRef{REQ-D-007}, \RequirementRef{REQ-D-008}, \RequirementRef{REQ-D-011}, \RequirementRef{REQ-I-002}, \RequirementRef{REQ-I-003}, \RequirementRef{REQ-I-004}, \RequirementRef{REQ-I-005}, \RequirementRef{REQ-I-006}, \RequirementRef{REQ-A-008}, \RequirementRef{REQ-A-010}, \RequirementRef{REQ-A-011}, \RequirementRef{REQ-A-012}, \RequirementRef{REQ-A-013}, \RequirementRef{REQ-A-014}\\ \textbf{Goal} & Restore an earlier or later completed source edit.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & A document is open and an undo or redo entry is available.\\ \textbf{Trigger} & The author invokes Undo or Redo.\\ \textbf{Main flow} & Cancel any active drag preview. Prepare the exact source state recorded by the selected entry, reparse and validate its display before acceptance. The document publishes the restored source/records and history position together, advances its revision and notifies the interface once. Refresh dirty state and controls. Future compiler integration marks any compiled view stale until successful Save requests compilation.\\ \textbf{Alternate flow} & If history is unavailable, disable the action. If restoration cannot complete, preserve both source and history position and report the failure. A later compilation failure does not reverse the accepted restoration.\\ \textbf{Postconditions} & Source reflects the selected history state, disk remains unchanged until Save, and the interface indicates whether source differs from the saved baseline.\\ \bottomrule \end{tabularx} \clearpage \subsection{UC-004 Diagram} \index{use case diagram!UC-004} This actor-goal view records the agreed behavior; document-owned history and restoration are shown in Figures~\ref{Figure:PlannedTransactionClasses} and~\ref{Figure:TransactionSequence}. Bounded implementation evidence appears in Section~\ref{Section:SessionHistoryCheck}; future compiler behavior is not claimed. \begin{figure}[htbp] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-004-history.tex}} \caption[UC-004: Undo or redo]{Actor-goal view for \UseCaseRef{UC-004}: undoing or redoing an edit. See the \hyperref[Figure:UseCaseDiagram]{overview} and \ChapterRef{Requirements} for the transaction and history rules. \label{Figure:UC004Diagram}} \end{figure} \clearpage \section{Reposition an Attached Label} \begingroup \small \begin{tabularx}{\linewidth}{@{}L{3.2cm}Y@{}} \caption{Proposed UC-005 Specification\label{Table:UC-005}}\\ \toprule \textbf{Field} & \textbf{Specification}\\ \midrule\endfirsthead \toprule \textbf{Field} & \textbf{Specification}\\ \midrule\endhead\bottomrule\endfoot \textbf{Identifier} & \UseCaseID{UC-005}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview}; \hyperref[Figure:UC005Diagram]{focused diagram}\\ \textbf{Mapped stories} & \UserStoryRef{US-003}, \UserStoryRef{US-004}, \UserStoryRef{US-007}, \UserStoryRef{US-008}, \UserStoryRef{US-009}, \UserStoryRef{US-010}, \UserStoryRef{US-011}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-F-021}, \RequirementRef{REQ-F-022}, \RequirementRef{REQ-F-023}, \RequirementRef{REQ-F-024}, \RequirementRef{REQ-D-009}, \RequirementRef{REQ-D-010}, \RequirementRef{REQ-D-012}, \RequirementRef{REQ-I-006}, \RequirementRef{REQ-I-007}, \RequirementRef{REQ-A-012}, \RequirementRef{REQ-A-013}, \RequirementRef{REQ-A-015}, \RequirementRef{REQ-A-016}, \RequirementRef{REQ-A-017}\\ \textbf{Goal} & Improve label placement while preserving its attachment and host geometry.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & A supported label/host relationship and current binding are available; movement capabilities permit the requested adjustment.\\ \textbf{Trigger} & The author selects a label and drags it in either or both canvas axes.\\ \textbf{Main flow} & The label receives priority over its host. Preview adjusts relative placement without source changes. On release, the responsible syntax provider proposes local source changes; common validation and document/history acceptance precede reparse and display refresh. Text, rotation, anchor, alignment and style are preserved unless requested.\\ \textbf{Alternate flow} & Cancellation restores the preview. Unsupported movement is unavailable with a reason; a rejected completed attempt shows the red-accented bottom strip once. Shared definitions and host coordinates remain unchanged; drag distance never detaches the label.\\ \textbf{Postconditions} & An accepted move is one undoable source change with attachment retained; noncommits preserve source/history.\\ \end{tabularx} \endgroup \clearpage \subsection{UC-005 Diagram} \begin{figure}[ht] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-005.tex}} \caption[UC-005: Reposition a label]{Planned actor-goal view for \UseCaseRef{UC-005}.\label{Figure:UC005Diagram}} \end{figure} \clearpage \section{Select an Obscured Element} \begingroup \small \begin{tabularx}{\linewidth}{@{}L{3.2cm}Y@{}} \caption{Proposed UC-006 Specification\label{Table:UC-006}}\\ \toprule \textbf{Field} & \textbf{Specification}\\ \midrule\endfirsthead \toprule \textbf{Field} & \textbf{Specification}\\ \midrule\endhead\bottomrule\endfoot \textbf{Identifier} & \UseCaseID{UC-006}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview}; \hyperref[Figure:UC006Diagram]{focused diagram}\\ \textbf{Mapped stories} & \UserStoryRef{US-008}, \UserStoryRef{US-009}, \UserStoryRef{US-010}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-D-009}, \RequirementRef{REQ-D-012}, \RequirementRef{REQ-I-008}, \RequirementRef{REQ-I-009}, \RequirementRef{REQ-I-010}, \RequirementRef{REQ-A-015}\\ \textbf{Goal} & Select an overlapping or obscured element without moving blocking objects.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & Supported selectable elements provide hit geometry and readable descriptions.\\ \textbf{Trigger} & The author right-clicks near objects or draws a region and right-clicks inside it.\\ \textbf{Main flow} & Direct right-click lists all elements intersecting the provisional 6-logical-pixel radius circle. Alternatively, an empty-canvas drag or Select area tool draws a retained rectangle; the menu lists intersecting elements, including partial intersections. Hover highlights each candidate; choosing one selects it. Labels precede overlapping hosts in ordinary hit selection.\\ \textbf{Alternate flow} & The Select area tool permits a region to start over objects; ordinary object drags retain movement behavior. Escape clears the region. No matches gives an empty/no-candidate indication without source changes.\\ \textbf{Postconditions} & The chosen element is selected; region creation and candidate browsing create no source edits or history entries.\\ \end{tabularx} \endgroup \clearpage \subsection{UC-006 Diagram} \begin{figure}[ht] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-006.tex}} \caption[UC-006: Select obscured element]{Planned actor-goal view for \UseCaseRef{UC-006}.\label{Figure:UC006Diagram}} \end{figure} \clearpage \section{Choose a Plugin or Shape Provider} \begin{tabularx}{\linewidth}{@{}L{3.2cm}Y@{}} \caption{Proposed UC-007 Specification\label{Table:UC-007}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-007}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview}; \hyperref[Figure:UC007Diagram]{focused diagram}\\ \textbf{Mapped stories} & \UserStoryRef{US-003}, \UserStoryRef{US-004}, \UserStoryRef{US-008}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-F-026}, \RequirementRef{REQ-F-027}, \RequirementRef{REQ-F-032}, \RequirementRef{REQ-D-016}, \RequirementRef{REQ-D-017}, \RequirementRef{REQ-A-019}, \RequirementRef{REQ-A-020}\\ \textbf{Goal} & Choose a Plugin or Shape Provider.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & compatible provider candidates are discovered.\\ \textbf{Trigger} & a duplicate ID or ambiguous provider choice requires a decision.\\ \textbf{Main flow} & Inspect candidate name, version, location and capabilities; explicitly choose a compatible candidate. Different shape variants may coexist and bind different elements.\\ \textbf{Alternate flow} & Cancel leaves conflicts unresolved. Incompatible candidates remain inactive with a reason. Existing bindings are not silently replaced.\\ \textbf{Postconditions} & The explicit choice is recorded for the applicable scope; source and history are unchanged.\\ \bottomrule \end{tabularx} \begin{figure}[ht] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-007.tex}} \caption[UC-007: Choose a provider]{Planned UML actor-goal view for \UseCaseRef{UC-007}.\label{Figure:UC007Diagram}} \end{figure} \clearpage \section{Handle an Available Plugin Update} \begin{tabularx}{\linewidth}{@{}L{3.2cm}Y@{}} \caption{Proposed UC-008 Specification\label{Table:UC-008}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-008}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview}; \hyperref[Figure:UC008Diagram]{focused diagram}\\ \textbf{Mapped stories} & \UserStoryRef{US-003}, \UserStoryRef{US-004}, \UserStoryRef{US-006}, \UserStoryRef{US-008}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-F-028}, \RequirementRef{REQ-F-029}, \RequirementRef{REQ-F-030}, \RequirementRef{REQ-F-031}, \RequirementRef{REQ-D-016}, \RequirementRef{REQ-D-017}, \RequirementRef{REQ-I-016}, \RequirementRef{REQ-A-020}, \RequirementRef{REQ-A-021}, \RequirementRef{REQ-A-022}\\ \textbf{Goal} & Handle an Available Plugin Update.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & an update origin and compatible candidate can be checked.\\ \textbf{Trigger} & startup or session discovery finds an update.\\ \textbf{Main flow} & At startup validate updates before restoring diagrams. During a session stage updates separately; activate only after rechecking that the provider is unused.\\ \textbf{Alternate flow} & For an in-use provider show a nonmodal Later or Restart and update choice. Retain the current version. Restart respects unsaved work. Failed staging/activation retains working support and reports the reason.\\ \textbf{Postconditions} & Accepted activation preserves supported data and choices; deferral or failure does not alter authoritative source.\\ \bottomrule \end{tabularx} \begin{figure}[ht] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-008.tex}} \caption[UC-008: Handle provider update]{Planned UML actor-goal view for \UseCaseRef{UC-008}.\label{Figure:UC008Diagram}} \end{figure} \clearpage \section{Create Using a Plugin-Provided Shape} \begin{tabularx}{\linewidth}{@{}L{3.2cm}Y@{}} \caption{Proposed UC-009 Specification\label{Table:UC-009}}\\ \toprule \textbf{Identifier} & \UseCaseID{UC-009}\\ \textbf{Diagrams} & \hyperref[Figure:UseCaseDiagram]{Overview}; \hyperref[Figure:UC009Diagram]{focused diagram}\\ \textbf{Mapped stories} & \UserStoryRef{US-001}, \UserStoryRef{US-002}, \UserStoryRef{US-003}, \UserStoryRef{US-004}, \UserStoryRef{US-005}, \UserStoryRef{US-007}, \UserStoryRef{US-008}, \UserStoryRef{US-009}, \UserStoryRef{US-011}\\ \textbf{Mapped requirements} & \RequirementRef{REQ-F-033}, \RequirementRef{REQ-F-034}, \RequirementRef{REQ-F-035}, \RequirementRef{REQ-D-001}, \RequirementRef{REQ-D-018}, \RequirementRef{REQ-I-006}, \RequirementRef{REQ-I-007}, \RequirementRef{REQ-I-013}, \RequirementRef{REQ-I-015}, \RequirementRef{REQ-I-018}, \RequirementRef{REQ-I-019}, \RequirementRef{REQ-I-020}, \RequirementRef{REQ-I-021}, \RequirementRef{REQ-A-024}\\ \textbf{Goal} & Create Using a Plugin-Provided Shape.\\ \textbf{Primary actor} & TikZ author\\ \textbf{Preconditions} & A compatible shape provider, reviewed placement parameters and a supported document/syntax insertion context are available. Detailed New/Save As and insertion rules remain open.\\ \textbf{Trigger} & the author chooses a shape to create a diagram or element.\\ \textbf{Main flow} & Open Shapes from the persistent sidebar strip and choose a distinguishable catalogue/provider entry. Click for provider-default placement or drag to size a rectangle. Preview obeys minima and stroke-aware bounds. The provider prepares interpreted geometry; the host prepares source insertion and the document validates acceptance. Acceptance assigns identity, selects the new element and returns to selection.\\ \textbf{Alternate flow} & Missing support or an unfittable default explains unavailable creation. Escape cancels without source changes. Rejected placement reports one reason per completed attempt and retains the tool for retry. New/Save As, insertion locations and exact gesture threshold remain for review.\\ \textbf{Postconditions} & Accepted creation retains editable source and unrelated bytes. Saving follows UC-003; no creation implementation is claimed.\\ \bottomrule \end{tabularx} \begin{figure}[ht] \centering \resizebox{0.85\linewidth}{!}{\input{../assets/use-case-diagrams/uc-009.tex}} \caption[UC-009: Create from plugin shape]{Planned UML actor-goal view for \UseCaseRef{UC-009}.\label{Figure:UC009Diagram}} \end{figure}