3.7 KiB
Writer working context — Phase 1 contract
Services/Writer/WriterContext.cs is an immutable projection of already-authorised entity selections, not an authorisation service, persistent global selector or Word-navigation operation. Constructors validate positive scope, scene/chapter completeness and cross-book selection; existing services still validate entity membership and permissions.
| Slot | Source / authority | Update and propagation |
|---|---|---|
| Scope | Authorised request/model project and book | New book means a new context, never reuse selections from the previous book. |
| SavedObjective | WriterObjective read for actor/book | Explicit SaveObjective only; unavailable target is omitted by existing SQL. |
| Working | Initially saved objective on dashboard | Separate slot for future explicit Write focus; no inferred change from a reference. |
| Exploration | Resolved saved Context/Intent scene, or temporary chart/map inspection | Independent and transient. Contract construction never navigates Word; existing explicitly trusted navigation controls remain unchanged in Phase1. Phase4 distinguishes exploration commands from Go to scene. |
| PinnedReference | Resolved saved snapshot selection | Does not subscribe to live Word following or change working objective. Invalid route IDs cannot become a valid selection. |
| Reader | Reader service’s authorised selected chapter | Reader model adapter; chapter changes do not retarget an active session or working objective. |
| Session | Explicit session book/chapter | Existing WriterWork state/start binding remains authoritative, including UUID/activity/native lease. Slot supports composition by future shell; dashboard does not invent a session from objective or URL. |
| VerifiedWord | Exact instance/document/manuscript, observed and accepted revision with resolved selection | Set only after existing saved-document, live-lease, accepted-position and race checks in WritingController. Invalidated target is cleared; no raw query ID is proof. |
Dashboard populates Scope, SavedObjective and Working. Resolved Context/Intent pages populate pinned/exploration and, after native verification, VerifiedWord; unresolved pages have no projected reference. Reader exposes its independent Reader slot. Active session remains fetched through existing WriterWork API/client polling; its identity/kind/native binding are not replaced by a route selection. The projection adds no persisted schema, localStorage global focus, new native protocol or automatic state fan-out.
Existing standalone windows, SignalR follow, exact native/session/grant checks, accepted manuscript revision boundaries, explicit Word navigation and named-window placement remain intact. Phase1 records these contracts and consumes them in view models/selection-role metadata; interactive cross-destination focus persistence/selection indicators belong to Phases2–4, not a hidden Phase1 shell redesign.
Status authority: scene RevisionStatusID plus the existing lookup describes canonical readiness. Legacy SceneWorkflow.DraftStatus/readiness fields are retained for compatibility; Intent no longer displays legacy DraftStatus as a conflicting workflow stage. No data backfill or silent overwrite occurs.
Scheduling remains two stores: legacy WritingScheduleItems with Planned/Done/Skipped/Moved and reviewed WriterPlannedActivities with Planned/Done. Completion is author-declared per record; it does not change scene status, checklist completion or work-session evidence. Preview filters by request scope before default plan choice, includes project-wide plans, and rejects an explicit out-of-scope plan. Unscoped direct Preview retains the existing personal all-plan behavior. Availability edits do not relocate reviewed allocations; explicit review/confirmation is required.