Conversation
Introduce docs/specs/ontology.md as the canonical vocabulary for Session states across six orthogonal layers (Process, Registry, View, Link, Activity, Snapshot). Define state names, transition verbs, and the Liskov contract for Registry APIs. Rewrite layout.md and vscode.md to use ontology vocabulary: resume vs restore (was overloaded "reconnect"), mount/unmount (was DOM-level "attach/detach"), dispose (was "destroyTerminal"), ActivityState (was "SessionUiState"), layoutAtMinimize (was "restoreLayout"), doors (was "detached"), exact/neighbor reattach (was "restore"). Code identifiers unchanged — this commit is spec prose only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
terminal-registry.ts exports renamed to match the ontology:
SessionUiState → ActivityState
DEFAULT_SESSION_UI_STATE → DEFAULT_ACTIVITY_STATE
subscribeToSessionStateChanges → subscribeToActivity
getSessionStateSnapshot → getActivitySnapshot
getSessionState → getActivity
primeSessionState → primeActivity
clearPrimedSessionState → clearPrimedActivity
attachTerminal → mountElement
detachTerminal → unmountElement
reconnectTerminal → resumeTerminal
destroyTerminal → disposeSession
destroyAllTerminals → disposeAllSessions
focusTerminal → focusSession
refitTerminal → refitSession
Module-level:
reconnectFromInit → resumeOrRestore
reconnectLivePtys → resumeLiveSessions
alert-manager.restore() → seed()
Shared types:
DetachedItem → DooredItem
PersistedDetachedItem → PersistedDoor
DetachDirection → DoorDirection
toDetachedItem → toDooredItem
Pond.tsx identifiers:
detachPanel → minimizePane
onDetach prop → onMinimize
'detachChange' event → 'minimizeChange'
[detached, setDetached] state → [doors, setDoors]
detachedRef, detachedItems, initialDetached, restoredDetached
→ doorsRef, doorItems, initialDoors, restoredDoors
findRestoreNeighbor → findReattachNeighbor (in spatial-nav.ts)
Persisted schema field names (PersistedDoor.restoreLayout,
detachedLayoutSignature, PersistedSession.detached) are unchanged —
they are kept on disk format until Phase D's migration.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Storybook: WithDetached story → WithDoors DetachedRingingSession → MinimizedRingingSession detachSelectedPane helper → minimizeSelectedPane Tests: detachSession helper → minimizeSession "detach preserves state" → "minimize preserves state" Pond.tsx local variables and comments: initialDetachedRef → initialDoorsRef nextDetached → nextDoors currentDetached → currentDoors Comments aligned to use "minimize" / "door" vocabulary. No behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rename fields in the on-disk PersistedSession shape to match the
ontology:
PersistedSession:
version 1 → 2
detached → doors
PersistedDoor (was PersistedDetachedItem):
remainingPanelIds → remainingPaneIds
restoreLayout → layoutAtMinimize
detachedLayoutSignature → layoutAtMinimizeSignature
Migration path: readPersistedSession(raw) normalizes v1 and v2 blobs
into the current v2 shape. Both session-save (write) and session-restore
and reconnect (read) route through it. Writes are always v2; reads
accept v1 and translate. v1 support can be removed after two releases.
Added session-migration.test.ts covering:
- v1 → v2 field translation
- missing optional detached field
- readPersistedSession accepting v1, v2, and rejecting malformed blobs
In-memory DooredItem interface and downstream consumers (Pond.tsx,
reconnect.ts, session-save.ts, session-restore.ts, stories, tests)
use the v2 field names throughout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Collapse DooredItem into a PersistedDoor-derived type alias, remove toDooredItem adapter and the manual reverse-map in doSave. - Extract PondSelectionKind = 'pane' | 'door' and replace inline unions. - Route vscode-ext session-state reads through readPersistedSession so the extension host accepts v1 blobs and normalizes to v2. Fixes a version-check bug (isPersistedSession was still asserting v1). - Finish retired-term cleanup: rename leftover panelIds locals and reconnect/detach comments in Pond.tsx, terminal-registry.ts, and platform/types.ts to the ontology vocabulary. - Drop migration JSDoc that recited the field-rename table. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sweep stragglers missed by Phases A-E so the specs and code fully match the retired-terms table in ontology.md. - docs/specs/layout.md: destroyTerminal -> disposeSession; findRestoreNeighbor -> findReattachNeighbor; PersistedDetachedItem -> PersistedDoor. - docs/specs/vscode.md: update session schema block to v2 shape (doors?: PersistedDoor[], with renamed subfields). - docs/specs/tutorial.md: detachChange -> minimizeChange. - website/src/lib/tutorial-detection.ts: hasDetached -> hasMinimized. - lib/src/lib/terminal-registry.ts: JSDoc/comment verbs align with function names (Resume, Unmount). - vscode-ext/src/extension.ts: drop unused getSavedSessionState and saveSessionState imports (both still used in webview-view-provider). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
23a25c2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c670e24b.mouseterm.pages.dev |
| Branch Preview URL: | https://ontology.mouseterm.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set a canonical vocabulary for states, entities, and transitions in mouseterm.