Merge single ongoing agent conversations into main
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
# Task: Design one ongoing conversation per user and cloud agent
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260928-agent-single-chat-27da516b
|
||||
- Mode: Feature
|
||||
- Branch: codex/20260928-agent-single-chat-27da516b-agent-single-chat
|
||||
- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260928-agent-single-chat-27da516b
|
||||
- Base commit: b26e25c9ed26bf30f4d0bc03869c223f0fe34386
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- User approved the proposed account + delivered-agent single ongoing chat and implementation.
|
||||
- Client store, per-turn scope/version, Host API, paged UI, legacy history, drafts, read receipts and focused regressions.
|
||||
- Coordination with the existing proactive-observer task was explicitly authorized. This task does not own its uncommitted implementation or its Reviewer.
|
||||
- No main merge, push, deployment, real paid model call, new subagent or worktree cleanup.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Concurrent Task Gate and Planning Gate Passed on initial design and implementation resume; official start/status confirmed this task's feature ownership.
|
||||
- Refreshed 128 peer records, read only their task records; consultation-scope client task is read-only diagnosis. Observer code remains in a separately owned worktree.
|
||||
- Stable delivered config ID, account isolation, student payer and three readonly tools remain. Pi/project files stay project-owned.
|
||||
- Every accepted question freezes project, Pi source and released version. Switching UI never changes an accepted read scope.
|
||||
- Existing main foreign documents and unrelated worktrees remained untouched. Only this task record/proposal are changed in project memory; canonical promotion remains integration work.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Main stores one account-agent chat under userData/agent-conversations/<account>/<agent>. A small message index and separate atomic turn files avoid rewriting every historical answer.
|
||||
- First question ensures the chat; repeated request IDs are idempotent, including older pages. One active manual question per account-agent. Snapshot progress/completion updates by request ID.
|
||||
- Latest 50 turns initially; older history pages remain available. SSE sends the current turn and metadata. Renderer merges delayed pages without overwriting newer streamed replies, preserves reading position while switching agents, and keeps account-agent text drafts.
|
||||
- Removed student new-topic plus and normal topic dropdown for delivered agents. Current project/source are shown. Cross-project/Pi references block sending until removed or the source is reopened; old reply actions cannot target another Pi session.
|
||||
- Contacts retain distinct unread state; read position is persisted in Main. Last selected disabled agent can reopen readonly history. Loaded-page/scroll cache is window-local; durable messages and read receipts survive restart.
|
||||
- Next question uses the current released definition. Same project/Pi/version reuses its internal thread; changing any starts an internal segment carrying bounded public history. Old imported cloud questions retain original cloudRequestId for cancellation.
|
||||
- Readonly conversation tool can retrieve older completed chat messages by ID through the frozen index without loading all bodies each question; prior-project message text does not grant prior-project file access.
|
||||
- Legacy topics are imported only on proven account/config identity, deduplicated by project/topic/request origin, and original files are retained. Body-before-index interruption recovers without duplicate import, including retry in the same process. Missing project directories can be retried later. Historical project and source topics, including unassigned/friend records, remain readonly via the old-records endpoint.
|
||||
- Discussion state is per project inside the chat; imported old cards retain their turn snapshots and newest project card. Legacy originals remain separately viewable.
|
||||
- README updated for the implemented client behavior. Accepted teacher ADR/domain/architecture changes are proposed, not promoted.
|
||||
|
||||
## Verification
|
||||
|
||||
- Relevant unit suite: 12 files, 365 tests passed. Includes Store/Service/actual HTTP + SSE/paging/legacy source archive/account isolation/concurrent duplicate acceptance/versions/Pi switching/frozen file roots/older message tool reads/import failure recovery/read receipts/UI delayed pages/old-record readonly/disabled history/independent agent drafts.
|
||||
- pnpm run typecheck: passed.
|
||||
- Focused ESLint over every changed TS/TSX file and new files: passed.
|
||||
- pnpm run build:vite: passed; existing chunk-size/dynamic-import/Browserslist warnings retained.
|
||||
- Real Electron test with deterministic Host fixtures: project consultations preserve student drafts and switch between work and chat without submitting advice, 1/1 passed. Screenshot manually inspected: topbar agents, one chat, no new-topic plus/select, project label, separate drafts, work tab preserved. Not a live cloud/model acceptance claim.
|
||||
- Expanded Main tsc: 66 diagnostics. Temporarily replayed original committed source inside this owned worktree under try/finally restoration; baseline also has the same 66 diagnostics (line positions normalized). No new diagnostics, but global Main typecheck is not clean.
|
||||
- Reproduced existing coding-teacher.test tool activity ID failure on original base: test expected parent run ID, existing implementation uses stable context/request ID. Corrected that assertion to the existing contract; the full related suite then passed.
|
||||
- No dependency lock/package change. Build output, local reports, runtimes and temporary checks are ignored and not committed.
|
||||
|
||||
## Coordination And Integration Dependency
|
||||
|
||||
- Authorized messages sent to existing thread 01a0dc9a-9b4e-7fa3-bb19-aea80abaaac4, task 20260928-agent-observer-design-9c41a872.
|
||||
- That task confirmed its Main suggestion contract in its own record: stable suggestion ID survives replacements; state.json is durably saved before advice delivery. Use projectId + suggestion.id for idempotent delivery; do not call sendConversation to invent a student message.
|
||||
- Actual manual APIs: GET /api/coding/agent-conversations/:agentId?before=...; POST /messages; /seen; /discussion; /save; /requests/:id/cancel; GET /events. service.conversation(agentId,before?) and service.sendConversation(agentId,input) own the unique chat.
|
||||
- Observer review was still in progress at this handoff; no observer code is in this branch. The combined integration MUST replace its discussObservation project-topic creation with inserting/opening this chat, plus delivery replay/read receipts. Its independent observation thread and Main project scheduler remain separate. Do not claim automatic advice has already been wired or combine branches without this adaptation and joint tests.
|
||||
- Observer coordinator source inspection confirmed Yuxi scope binds both project and Pi source, and native YuxiSummarizationMiddleware exists. This justified Pi-aware segment rotation; neither cloud deployment nor compression quality was independently exercised here.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- User-requested main merge is not yet authorized for this implementation.
|
||||
- During integration reconcile observer suggestions as above, and promote the approved account-agent/per-turn semantics; retain unrelated docs.
|
||||
- Validate configured Yuxi deployment against current client; no real cloud/paid-model run occurred. Cross-device history synchronization is outside this increment.
|
||||
- Retained worktree belongs to this completed feature; no cleanup requested.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Targets: ADR-2026-09-22-coding-teacher.md, system-overview.md, data-flow.md, business-rules.md and current state.
|
||||
- Proposal: replace visible project/version topic identity with account-agent chat; bind project/Pi/version to individual execution turns; account-agent drafts/read receipts, paged files/index, retained source archives.
|
||||
- Evidence: approved user request, implementation, 365 related tests, Electron UI and cloud request contract tests.
|
||||
- Future impact: history lifecycle, cloud scope rotation/summary, old-context actions, observation delivery.
|
||||
- Semantic conflicts: accepted project-topic/version policy is intentionally revised by user approval; observer project-topic creation must be adapted at joint integration.
|
||||
- Human confirmation: single-chat direction and implementation approved. Main merge/deployment require their own corresponding user request.
|
||||
@@ -0,0 +1,46 @@
|
||||
# Task: Integrate one ongoing conversation per delivered agent
|
||||
|
||||
## Identity
|
||||
|
||||
- Task ID: 20260928-merge-agent-single-chat-9911c6df
|
||||
- Mode: Integration
|
||||
- Branch: main
|
||||
- Worktree: D:\Datas\OthersProjects\makelore
|
||||
- Base commit: a1d52c60d841dc451545805af5fe91b0ca8839d3
|
||||
- Owner: codex
|
||||
- Status: Ready for Integration
|
||||
|
||||
## Scope
|
||||
|
||||
- Merge source e54f3d2 and 7aa81da into local main; promote the approved account-agent ongoing conversation contract.
|
||||
|
||||
## Intent And Constraints
|
||||
|
||||
- Concurrent and Planning Gates Passed. Official start/status match Identity and exclusive integration ownership. Loaded required entry, own/source tasks, relevant accepted ADR, architecture/domain/evidence/reflection/commitments and peer task scopes. Historical placeholder scopes remain unknown but have no concrete dependency on this merge.
|
||||
- User authorized main merge and explicitly approved releasing completed 20260928-merge-consultation-scope-ml-7b56cbe4 and adopting three known foreign task documents. Preserve them unchanged and exclude them from commits. Source task/proposal remain read-only.
|
||||
- Registered the exact unchanged source task/proposal imported by the authorized merge before committing, following the documented source-record adoption procedure. Same-task official resume/status and refreshed Planning Gate passed with unchanged base and scope.
|
||||
- Approved account-agent chat replaces visible project/version topics; each accepted execution still freezes project/Pi/version, student payer and readonly tool scope. No changes to Pi project ownership.
|
||||
- Observer task 20260928-agent-observer-design-9c41a872 remains uncommitted and separate; authorized coordination sent. Its later merge must adapt durable suggestion delivery/discussObservation to this chat and jointly test idempotency, unread state, scope and focus. Do not import its unfinished code here.
|
||||
- Plan: merge exact source without rewriting product files, reconcile accepted canonical rules, verify source product/history preservation and documentation boundaries, then commit/complete. Reuse source verification if product/test tree is identical; rerun only checks justified by integration changes.
|
||||
- No new subagents, push, deployment, packaging, paid model calls or cleanup.
|
||||
|
||||
## Outcome
|
||||
|
||||
- Source 7aa81da (including design e54f3d2) merged conflict-free into local main. Product, tests, README and source records are byte-identical to the verified source; main's separate consultation-scope diagnosis remains preserved.
|
||||
- Promoted approved account-agent conversation identity, per-turn project/Pi/version scope, paged persistence, read receipts, drafts and retained legacy archives into the teacher ADR, architecture, domain rules, decision/evidence indexes and Integrated Through.
|
||||
- Explicitly recorded that legacy Renderer check-ins stop for delivered-agent chats and the independent observation implementation is not part of this merge. Its later integration must adapt durable advice delivery rather than creating project topics.
|
||||
- Three adopted foreign documents remain unchanged and excluded. No push, packaging, installation, deployment or cleanup.
|
||||
|
||||
## Verification
|
||||
|
||||
- Source verification reused because integration changes only canonical/task documentation beyond the exact source: 365 related tests, Renderer typecheck, changed-file ESLint, Vite build and one real Electron interaction with deterministic Host fixture passed. Expanded Main has the same 66 pre-existing diagnostics; no live paid-model claim.
|
||||
- Conflict-free merge, exact product/test/source-record preservation, git diff --check and task-aware documentation drift checks passed. The official gate also verifies the three adopted external records retain their original bytes/index state. Main's earlier diagnosis commits are retained as the first-parent history.
|
||||
|
||||
## Follow-ups
|
||||
|
||||
- Observer task 20260928-agent-observer-design-9c41a872 must consume this main and complete same-chat suggestion delivery/read receipts/idempotency/scope/focus tests before its own merge. Existing thread coordination is user-authorized.
|
||||
- Production/installed-client acceptance and optional task worktree cleanup are separate. No cross-device history synchronization is implemented.
|
||||
|
||||
## Promotion Candidates
|
||||
|
||||
- Accepted and promoted the source account-agent/per-turn contract under the user's implementation and merge approval; no unresolved product-direction choice. Source task/proposal remain unchanged historical records.
|
||||
Reference in New Issue
Block a user