Merge project-scoped agent conversations into main
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# Task: Isolate delivered agent conversations by project
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260928-agent-project-chat-6644c06d
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260928-agent-project-chat-6644c06d-agent-project-chat
|
||||
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260928-agent-project-chat-6644c06d
|
||||
- Base commit: a21a1f077cc11976213290a6b843bb74be97ab44
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Correct visible ongoing conversation identity to account + project + delivered agent. Own Main store/API, per-project history/drafts/read receipts and related UI/tests.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- User explicitly clarified that different projects must have different conversations with the same agent; this supersedes the prior cross-project assumption. Keep one ongoing chat inside each project, with no new-topic/dropdown controls.
|
||||
- Concurrent and Planning Gates Passed: official start/status match Identity; required context reused from preceding integration plus latest main refresh/UI amendments. Read 132 peer task records, retaining historical placeholder scopes as unknown. Observer is separately ready and not merged; authorized coordination sent with corrected identity.
|
||||
- Preserve current Main authentication, student payer, frozen Pi/version/read scope, configuration refresh and UI polish. Retain original legacy/mixed history; import only turns proven to belong to the selected project. No new subagents, paid-model calls, merge, push, deployment or cleanup.
|
||||
- Plan: reverse the existing two-project service/UI expectations to reproduce the reported behavior; bind project at storage and Host API boundaries; split existing global history by per-turn project without deleting originals; scope drafts/read receipts/cache/subscriptions; run relevant unit/type/lint/build/Electron regressions.
|
||||
- diagnosing-bugs broad hypothesis enumeration is unnecessary here: the previous implementation and its explicit cross-project test encode the now-corrected requirement. Use the failing two-project regression as the feedback loop.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Completed project isolation: the visible chat, store/cache ownership, acceptance locks, SSE, cancel/discussion/save/seen routes and Renderer state use account + project + delivered agent. Same-project Pi or published-version changes retain the visible chat while preserving the existing per-turn execution scope.
|
||||
- Host API is now /api/coding/projects/:projectId/agent-conversations/:agentId with the same child actions. service.conversation(projectId, agentId, before?) and markConversationSeen(projectId, agentId, requestId) bind reads/receipts; sendConversation(agentId, input) requires input.projectId. New storage sits under userData/agent-conversations/account/agent/projects/projectId.
|
||||
- Upgrade reads the previous global manifest and turn files without modifying them. Proven per-turn project ownership partitions history, preserves original/cloud request IDs, maps each project's seen position, copies its discussion and forces a new cloud checkpoint. Interrupted index writes resume idempotently; unowned messages remain in the original archive. Legacy project topic imports retain origin deduplication.
|
||||
- Per-project drafts, cached pages/read anchors, selected contact and unread receipts restore on switching back. An old global draft is adopted only by its recorded project, ahead of older pre-single-chat project drafts; all originals remain intact. Delayed reads/SSE/external topics cannot populate another project's chat.
|
||||
- Current main catalog refresh/hover introduction behavior retained; no new-topic/dropdown controls reintroduced. README updated. No paid cloud call, production deployment, main merge or task directory cleanup.
|
||||
|
||||
## Verification
|
||||
|
||||
- Red reproduction: the new two-project service test failed because both projects returned the same chat ID before implementation.
|
||||
- 382 relevant tests passed across 12 files: persistence/real HTTP routes/pagination/migration/partial-write retry/cloud segment scope/concurrent project runs/account isolation, panel/project draft restoration/late responses, catalog refresh, guidance/discussions/read tools/model/cloud/activity contracts. The final service file passed 11/11; final Renderer files passed 77/77; unchanged supporting files passed 294/294.
|
||||
- pnpm 10.33.4 run typecheck passed. Changed-file ESLint and git diff --check passed. build:vite passed (Renderer/Main/Preload/utility); existing Browserslist/chunk/dynamic-import warnings remain.
|
||||
- Electron: three specs passed (project consultations, new two-project chat/draft/reload regression, manual catalog refresh). The two-project spec was rerun and passed after the final draft migration adjustment. Test uses isolated app data and mocked model responses; screenshot inspected, not a production cloud/model acceptance.
|
||||
- Expanded Main tsc reports 66 diagnostics outside the changed teacher/store/API modules; this matches the previously documented count but is not a clean global Main typecheck. Current diagnostics are in local temp agent-project-chat-main-tsc.txt. No unrelated fixes were made.
|
||||
- Self-reviewed storage/API/Renderer diff against the explicit corrected requirement. No subagent created; Yuxi code was not changed.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Main merge awaits a user request for this correction. Keep task worktree/branch for that integration.
|
||||
- Existing observer task 20260928-agent-observer-design-9c41a872 is separately ready and not included. Authorized coordination was sent to thread 01a0dc9a-9b4e-7fa3-bb19-aea80abaaac4: delivery/opening must use account + project + agent, preserve projectId + stable suggestion.id idempotence, and retain its separate observation runtime. Joint integration must adapt its topic creation and new route/service signatures.
|
||||
- No cross-device synchronization or runtime cloud deployment verified. Existing unowned historical messages are preserved on disk without guessing a project.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Targets: current state, ADR-2026-09-22-coding-teacher.md, system-overview.md, data-flow.md and business-rules.md.
|
||||
- Proposal: correct the previously integrated account-agent global-chat assumption to account-project-agent ongoing chat. Project is the history/draft/read receipt and model-context boundary; Pi source and published version remain per-turn execution boundaries. Integrate the explicit routes/storage and upgrade behavior above.
|
||||
- Evidence: user's explicit correction, red/green two-project regression, retained-file migration tests, clean cloud checkpoint test, 382 unit tests and three Electron specs.
|
||||
- Future impact: observer suggestion delivery must target this project's agent chat; bundled clients and Host API ship together. Global-chat checkpoints cannot be reused after partitioning. Preserve old source records.
|
||||
- Semantic conflict: supersedes the previous single-chat feature's cross-project assumption. User already explicitly resolved this product scope; no new approval needed to accept project isolation. Main merge/deployment still require their corresponding request.
|
||||
@@ -8,7 +8,7 @@
|
||||
- Worktree: D:\Datas\OthersProjects\makelore
|
||||
- Base commit: a1d52c60d841dc451545805af5fe91b0ca8839d3
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
- Status: In Progress
|
||||
|
||||
## Scope
|
||||
|
||||
@@ -62,3 +62,17 @@
|
||||
- Electron scenarios passed: consultation switching/hover/drafts, manual refresh/failure/retry with ongoing history, and delivered-agent presence/focus/preview with no legacy check-in. All 9 browser layout scenarios passed after fixture adaptation. Manually inspected final refresh and narrow hover screenshots. Isolated deterministic Host responses only; no live model calls.
|
||||
- README now describes current per-turn versions and unique chats consistently with refresh. Canonical teacher ADR, architecture and Integrated Through record the combined behavior. Remote source task records remain byte-identical to 4495345; the three pre-existing untracked documents are excluded from the merge. No push, deployment, packaging, source-worktree deletion or observer feature integration.
|
||||
- Final scope verification includes both parent histories, no conflict markers/unmerged index entries, whitespace and task-aware documentation drift gates. No new cleanup candidate is created: the resumed root main checkout is unmanaged and is retained.
|
||||
|
||||
## Project Isolation Correction Resume
|
||||
|
||||
- User explicitly corrected the ongoing-chat identity to account + project + delivered agent and requested the completed correction be merged into main. Resume this same integration task without releasing ownership or changing its recorded base. Official start/status, exclusive integration ownership and Planning Gate passed; 133 registered task records were assessed, including the ready source and independent observer. Historical placeholder scopes remain unknown with no concrete dependency on this merge.
|
||||
- Scope: integrate source 4b41c23a3a5e9da1a329b1b69930787a670163de from main base a21a1f077cc11976213290a6b843bb74be97ab44. Project separates history, drafts, read receipts, events and model context; each project-agent pair still has one visible ongoing chat. Preserve original mixed history and retain all source task records unchanged. The user's explicit correction supersedes the earlier cross-project product assumption recorded above.
|
||||
- Plan: merge the verified source without rewriting product files, reconcile the teacher ADR, architecture, domain and shared indexes, check exact source product/test preservation and document boundaries, then commit and complete. Reuse source verification if integration changes only documents. Preserve the three previously adopted foreign documents unchanged and unstaged. No new subagents, push, deployment, packaging, paid model calls or cleanup.
|
||||
- Independent observer task 20260928-agent-observer-design-9c41a872 remains outside this merge; authorized coordination already supplied the project-scoped identity and Host API/service changes. Future suggestion delivery must target this project's agent conversation.
|
||||
|
||||
### Project Isolation Outcome And Verification
|
||||
|
||||
- Source 4b41c23 merged without conflicts. All non-project-document files and the imported source task record match the verified source exactly. Updated the accepted teacher ADR, decision index, architecture/data flow, domain rules, evidence index and Integrated Through to the user-approved account-project-agent identity. Earlier integration/source records remain historical evidence rather than the current cross-project rule.
|
||||
- Reused the identical source's 382 relevant tests, standard typecheck, changed-file lint, Vite build and three Electron regressions. No product edits or added test scope in this integration; expanded Main retains the documented 66 existing diagnostics. No installed-client or live model acceptance claim.
|
||||
- Product/source equality and staged/working whitespace checks passed. The pre-commit drift check reports only the newly staged source task record: the current bundled script requires a committed unchanged import and shared source-branch ancestry. Its source record is byte-identical to 4b41c23 and the source branch is retained. The normal requested merge will establish that ancestry; run the official drift gate after committing, before completion. No adoption, base rewrite or checker bypass is used.
|
||||
- Three existing untracked foreign task documents remain unchanged and excluded. No push, deployment, packaging, paid model calls or source-worktree cleanup. Retain the source worktree until the post-merge cleanup offer is answered.
|
||||
|
||||
Reference in New Issue
Block a user