Add switchable workspaces, thinking decks and private insights - #2807
Add switchable workspaces, thinking decks and private insights#2807Chris0Jeky wants to merge 23 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Concurrent-lane coordination from the September 8 issue-wave coordinator: this overhaul remains owned by its active author thread; I am not adopting its review, edits or merge decision. Our earlier capture repair PR #2805 is frozen at d4562fb, with full backend 8,977 passed / 5 existing skips and clean independent Terra review; hosted qualification is finishing. It adds Capture.LegacyReconciliationVersion plus an EF migration/model snapshot. This overlaps your migration snapshot and UPGRADING.md, so please carry both models when the later branch integrates main; do not resolve the snapshot by choosing one side. Proposed order: #2805 first, then this branch refreshes the EF snapshot and re-proves migration/model consistency at the new base. I also claimed #2235 for a bounded STATUS/MASTERPLAN wave record before this PR appeared. That record is still an unpublished draft. I will preserve your separate product claims, wait for migration integration to settle, and append the wave record against current main. No changes to this PR are being made by my lane. Shared machine builds are deliberately serialized in my lane because free RAM is about 2 GB. |
|
One fresh-context frontend adversarial review was completed asynchronously against base cbc2670 and head 8e9af0b.
No further confirmed CRITICAL/HIGH frontend defects were found in layout/theme continuity, Home capture, Thinking/private answers, memory archive/export, insights, board disclosure or routing. Backend review is independent. No broader review/fix loop is opened for the non-blocking item. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e9af0b28c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
One independent backend adversarial review was completed asynchronously against base cbc2670 and head 8e9af0b. Three HIGH defects are confirmed and are being corrected in the single review-fix round:
MEDIUM, tracked in #2808: memory-review evidence prefixes an allowed 8,000-character memory, but the answer DTO caps echoed evidence at 8,000. A max-length memory can produce an insight whose exact evidence cannot be submitted. No fix cascade is opened for that non-blocking boundary here. No other confirmed blocker was found in the reviewed migrations, question-answer privacy/idempotency/revision checks or board JSON thinking round-trip. This PR remains unmerged until the HIGH fixes and required verification are complete. |
|
Coordination update: #2805 has now merged as dfa12ea after 35 successful/intentional-skip hosted contexts and clean independent review. It adds migration 20260908005202_AddCaptureLegacyReconciliationVersion and the Capture repair-version snapshot column. The later overhaul integration must retain this column/migration alongside all three of its own migrations and re-prove model consistency; source ownership remains with your thread. The coordinator's #2235 record will append bounded wave blocks against current main while your single blocker-fix round proceeds. Both delivery records should survive the later docs integration. No edits to this PR are being made by this lane. |
|
Review triage is complete for the comments on 8e9af0b: the three P1 backend findings and independent Memory draft finding are fixed and locally proved; the Classic Home dialog P2 is declined with a real browser regression; the remaining MEDIUM items are tracked in #2808. The automatic review wrapper is informational, not an additional finding. All seven inline threads have a specific disposition. Final head 747e9c4 has 275 combined backend tests, a production frontend build and documentation gates passing. Exact-head CI is still running; no merge is claimed. A scoped Luna verification of the backend fixes is completing independently. |
|
Scoped fix verification is complete: Luna found no unresolved or introduced HIGH/CRITICAL defect in f2f0ce9 and 2fe134d and independently passed 15 focused API tests. Root final combined check passes 275 tests. The original independent review findings are now fixed or explicitly tracked/declined; no further review loop is planned. Final-head CI remains the merge gate. Durable local receipt: C:\Taskdeck-overhaul\evidence\HANDOFF.txt. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 747e9c4e8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| public async Task<Result<WorkspaceMemoryDto>> CreateAsync(Guid userId, CreateWorkspaceMemoryDto dto, CancellationToken ct) | ||
| { | ||
| if (!await CanRead(userId, dto.BoardId, ct)) return Missing<WorkspaceMemoryDto>(); |
There was a problem hiding this comment.
Join private workspace writes to the board archive guard
When an archive commits after this active-board check but before SaveAsync, the memory insert still succeeds because the tracked board does not participate in the write. Subsequent workspace-memory reads reject archived boards, so the newly saved private entry immediately becomes inaccessible; insight answers, revisions, and analysis use the same check-then-save pattern. Fresh evidence beyond the previously flagged Thinking Deck PUT is that these separate private-workspace paths still omit Board.RecordDependentMutation() from their save.
Useful? React with 👍 / 👎.
| public class WorkspaceInsightRepository(TaskdeckDbContext db) : IWorkspaceInsightRepository | ||
| { | ||
| public async Task<IReadOnlyList<WorkspaceMemory>> MemoriesByUserAsync(Guid userId, int limit, int offset, CancellationToken ct) => | ||
| await db.Set<WorkspaceMemory>().AsNoTracking().Include(x => x.History).Where(x => x.UserId == userId) |
There was a problem hiding this comment.
Bound revision histories loaded for account exports
For a memory with a large revision history, this Include materializes every revision even though export limits count only top-level memories. Repeated PUTs can create an unlimited number of revisions containing up to 8,000 characters each, so both the buffered export and its advertised streaming fallback can exhaust memory while processing a single record. Apply an aggregate content limit to buffered exports and page or stream nested revisions.
Useful? React with 👍 / 👎.
| <header><p class="thinking-workspace__eyebrow">ROOM TO THINK · {{ board?.name }}</p><h1>{{ card.title }}</h1><p>Keep possibilities, questions and next steps close to the work. A simple card can stay simple.</p></header> | ||
| <ThinkingDeckPanel :key="card.id" :board-id="boardId" :card-id="cardId" @dirty-change="dirty = $event" /> | ||
| </template> | ||
| <TdDialog :open="leaveRequested" title="Leave unsaved thinking?" description="Your thinking deck has unsaved changes. Save it before leaving, or discard this draft." @close="decide(false)"><template #footer><button type="button" @click="decide(false)">Keep editing</button><button type="button" @click="decide(true)">Discard draft and leave</button></template></TdDialog> |
There was a problem hiding this comment.
Block discard navigation while thinking writes are pending
On a slow Thinking Deck PUT or private-answer POST, the draft remains dirty while the request is in flight, so navigation opens this dialog with “Discard draft and leave” enabled. Selecting it unmounts the editor but does not cancel the request, allowing the shared deck or private answer to persist after the user explicitly chose to discard it. Propagate the pending-save state and disable leaving until the write settles or is safely aborted.
AGENTS.md reference: frontend/AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
| <PaperHLBtn | ||
| data-action="analyze-insights" | ||
| variant="ember" | ||
| :disabled="!selectedBoardId || analyzing || loading || Boolean(answeringInsightId) || busyInsightIds.size > 0" |
There was a problem hiding this comment.
Disable analysis while the query-selected board reloads
When this reused view changes from ?boardId=A to ?boardId=B, loadBoards() sets boardLoading but temporarily leaves selectedBoardId at A. Because this disabled expression omits boardLoading, the user can click Analyze during the reload and persist private insights for A before the selection switches to B. Include the board-loading transition in the disabled state or clear the stale selection before fetching.
AGENTS.md reference: frontend/AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
Taskdeck can now switch between Classic, Studio, Companion and Unified while retaining the current route, boards, open editors and drafts. Zen/Studio/Control presentation and prototype-inspired Grove/Grove Night themes are independent preferences. Classic stays the default.
This integrates the maintainer's 20-file prototype pack into the authenticated application: real Home capture and Companion chat, persisted card Thinking Decks, source-checked private answers to shared questions, quiet structural insights, revisioned private memory with archive/restore and JSON download, and session-only comparison notes. Capture → review → approve → explicitly confirm/apply remains enforced. Shared board JSON carries thinking and excludes private answers.
Three additive migrations introduce the records and question-source fields. Both account export formats include private records, originals, evidence and history; transactional account deletion erases them while preserving collaborators' records. Thinking saves reject archived boards, including an archive racing the save. Memory drafts require explicit discard.
The complete source manifest, architecture decision, upgrade notes and feature ledger are included. Raw chats, prototype files and synthetic databases are not committed. Remaining prototype interactions, continuity, contextual recall and model/attention work are tracked in #2808; the current comparison page supports personal trials without statistical A/B claims.
Validation:
No operational database, live external model, microphone, deployment or release was exercised. Existing owner decisions remain in OUTSTANDING_TASKS.md.
Closes #2800.
Local evidence is retained under C:\Taskdeck-overhaul\evidence. Integration checkout: C:\Taskdeck-overhaul\integration. The maintainer's primary checkout and two unpublished commits remain preserved. Raw resources remain in the original supplied folder; disposable worker outputs were inventoried before worktree removal.