Files
ThothII/docs/reports/2026-09-12-context-shelf-a-implementation.md
T

97 lines
5.3 KiB
Markdown

# Context shelf A: implementation and local acceptance
Date: 2026-09-12. Status: implemented and deployed to local Docker; not deployed to the server.
## Accepted scope
The owner selected the latest option A and explicitly required functional
preservation of Core and session management. Aesthetic refinement is limited to
the agreed Administration workbench and global context.
- Workspace, Evidence, Memory, Database and Pi open as peer pages in the work area.
- A single top collapsible shelf selects workspace and interaction model.
Explicit choices are independently remembered per origin, mount and principal;
installation defaults fill only missing choices. Invalid saved choices fail
closed instead of silently choosing another context.
- Core's composer, eight phases, review widgets and left activity log remain the
original production components. Session scope tabs, grouping, rename, archive,
bulk operations, read-only inspection and guarded Resume remain intact.
- Visited Admin pages and Core remain mounted during page navigation.
Unsaved Admin edits block navigation/context changes until saved or explicitly
cancelled in the editor. Failed saves and failed catalog refreshes preserve drafts.
- Workspace/model selectors are locked during operations. A navigation drawer
preserves access to the session rail when the log is open or space is narrow.
- The unified Installation Model Catalog remains the only model authority.
Core and metadata generation consume the same canonical selection.
Resume now includes the session's pinned `workspaceId` in successful responses,
binding the global workspace immediately without replacing the selected model;
older backends have a manifest fallback.
- Impeccable informed typography, warm surfaces, restrained red, spacing,
natural help-text wrapping and container-responsive layout. No Omics header
or left sidebar was added to production ThothII.
- A, B and C prototype sources and launch scripts were preserved.
## Verification
Using Node 24.16.0:
| Check | Result |
| --- | --- |
| Full frontend Vitest suite (two workers) | 671 tests passed, 82 files |
| Full backend Vitest suite (two workers) | Passed; existing 40 opt-in auth runtime projection tests skipped |
| Frontend TypeScript build check | Passed |
| Backend TypeScript check | Passed |
| Frontend production Vite build | Passed; bundle-size advisory remains |
| Git whitespace check | Passed |
| Strict MkDocs build | Passed |
Regression fixtures now provide valid context where they exercise normal Core
or session workflows. Separate tests explicitly cover invalid saved context,
global selector uniqueness, lock/unlock, failed and successful saves, retained
drafts across refresh failure, Core/Admin round trips, and pinned-workspace Resume.
The existing 40 session-management tests remain green.
Browser acceptance used the actual production React application against a
temporary read-only synthetic API, not the earlier prototype implementation.
Checked Core, expanded/collapsed shelf, Memory, session scope tabs and mobile
navigation at 390, 768 and 1280 CSS-pixel application widths. The test frame
scaled wider layouts to fit the inspection panel; layout width inside the frame
remained the stated CSS width. No real data, provider calls or runtime mutations
were performed. This is sampled visual acceptance, not certification of every
Admin editor on the real portal.
## Remaining release gates
### Local Docker update
At the owner's subsequent request, core and frontend were rebuilt from
`/Users/mp/projects/ThothII` and recreated in the existing
`thothii-18998cca7b0a` project. Its launcher preserves all previous Compose
bindings and adds `/private/tmp/thothii-context-a.compose.yaml` last to override
the old worktree build context. Only core/frontend were recreated; PostgreSQL,
Qdrant, embedding and persistent volumes were retained.
Verified HTTP 200 for the frontend and both direct/proxied core health endpoints.
The served production bundle contains the global shelf and unsaved-change guard,
without the synthetic preview API. All five persistent services report healthy.
The mounted catalog is schema v2, default `zai/glm-5.3`, with shared
DeepSeek Pro/Flash, local Qwen and GLM model identities.
Previous image tags are retained as `before-context-a-20260912` for each image.
This startup check does not exercise authenticated Core/provider or Admin workflows.
### Server release
1. Integrate on the server beneath Omics Portal's actual red header and beside
its existing sidebar. Supply available height through `--thoth-app-height`
when the host is shorter than the viewport. Check real host styles, widths,
zoom, keyboard traversal and Back/Forward.
2. Use approved test data to verify configured Core/Pi and Admin/LiteLLM models
through their real workflows. Unit fixtures do not certify provider compatibility.
3. Verify workspace readiness, synchronization and resume on the configured
stack before release. Follow the existing guarded server migration runbook.
4. Gitea publication and final independent standards/spec review remain separate
gates; no remote issues or deployment are claimed by this implementation.
The working tree also contains earlier model-catalog and Administration work.
Unrelated changes were preserved; this report does not claim a clean or committed tree.