Skip to content

FE-691: Multi-chat substrate — chat table + reconciliation_edge#90

Merged
lunelson merged 50 commits into
mainfrom
ka/fe-691-multi-chat-substrate
May 7, 2026
Merged

FE-691: Multi-chat substrate — chat table + reconciliation_edge#90
lunelson merged 50 commits into
mainfrom
ka/fe-691-multi-chat-substrate

Conversation

@kostandinang
Copy link
Copy Markdown
Contributor

@kostandinang kostandinang commented May 5, 2026

What

Adds docs/design/MULTI_CHAT.md — RFC for the multi-chat data-model substrate. Doc-only.

Why

Phase 1 of the substrate evolution toward the patch ledger (A71). Repoints turn from specification to a new chat table, adds specification.primary_chat_id and chat.active_turn_id, and introduces reconciliation_edge for the cross-surface "this item changed, that needs attention" signal. No user-visible change.

Supersedes the deprecated ADR on ka/fe-656-side-chat_v4 (parked, not merging).

Unblocks

  • Side-chat V3 — cleaner cascade design (cascade reads from reconciliation_edge, replacing ad-hoc REVISIT state).
  • Side-chat V4 — multiple persistent threads become shippable without waiting on A71.
  • Architect / generator loop — first version becomes shippable without A71.

Track placement

Independent of FE-656; peer of the side-chat track on Track B (Infrastructure). FE-656 sub-items V3 and V4 will reference this issue as a blocker.

Linear

FE-691

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 5, 2026

FE-691 Multi-chat substrate — chat table + reconciliation_edge

Summary

Substrate-only data-model RFC. First phase of the substrate evolution toward A71 (patch ledger) and ontology sharpening. No user-visible change.

Scope

  • Introduce chat table (turns relate to chat_id instead of specification_id).
  • Add specification.primary_chat_id (interview chat) and chat.active_turn_id (replacing specification.active_turn_id).
  • Introduce reconciliation_edge table for cross-surface "this item changed, that needs attention" signal.
  • Migrations + read/write code-path repointing.

Out of scope

Patch ledger (A71); phase-route de-emphasis; ontology sharpening (invariant, example as kinds); decision shape rework; option table fate; phase_outcome enum redesign; reconciliation agent loop; side-chat UI changes for multi-thread.

Design doc

docs/design/MULTI_CHAT.md

Unblocks

  • Side-chat V3 — cleaner cascade design (cascade reads from reconciliation_edge instead of ad-hoc REVISIT state).
  • Side-chat V4 — multiple persistent threads become shippable without waiting on A71.
  • Architect / generator loop — first version becomes shippable without A71.

Relation to FE-656

Independent of FE-656 (side-chat user surface). Peer of side-chat track on Track B (Infrastructure). FE-656 sub-items V3 and V4 will reference this issue as a blocker.

Review in Linear

Copy link
Copy Markdown
Contributor Author

kostandinang commented May 5, 2026

@kostandinang kostandinang changed the title FE-691: Add multi-chat substrate RFC FE-691: Multi-chat substrate — chat table + reconciliation_edge May 5, 2026
kostandinang added a commit that referenced this pull request May 5, 2026
Branch parked, not merging. Replaced by docs/design/MULTI_CHAT.md
(PR #90, FE-691). Kept in-tree for review-thread context.
@kostandinang kostandinang marked this pull request as ready for review May 5, 2026 15:15
@kostandinang kostandinang requested a review from lunelson May 5, 2026 15:15
@cursor
Copy link
Copy Markdown

cursor Bot commented May 5, 2026

PR Summary

Low Risk
Documentation-only change proposing future schema/migration work; no runtime or data-path changes in this PR.

Overview
Adds a new proposed design RFC, docs/design/MULTI_CHAT.md, describing a multi-chat substrate that introduces a chat table (turns attach to chats, active_turn_id moves from specification to chat, and specification.primary_chat_id is added) and a new reconciliation_edge table for tracking open cross-item reconciliation issues.

The doc also outlines the intended Drizzle/SQLite migration sequence and invariants, but does not implement any schema, migration, or code changes.

Reviewed by Cursor Bugbot for commit 33db9aa. Bugbot is set up for automated code reviews on this repo. Configure here.

@kostandinang kostandinang self-assigned this May 5, 2026
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 5, 2026

🤖 Augment PR Summary

Summary: Adds an RFC-style design doc describing Phase 1 of a “multi-chat” substrate evolution (doc-only; no runtime changes).

Changes:

  • Introduces a new chat table so turn rows attach to a chat instead of directly to specification.
  • Moves active_turn_id from specification onto chat, and adds specification.primary_chat_id to point at the canonical interview thread.
  • Adds a new reconciliation_edge table to represent “needs attention” signals between knowledge items, distinct from semantic knowledge_edge relations.
  • Details a Drizzle/SQLite migration plan (backfills + column drops via recreate/copy) and outlines verification goals.
  • Defines phasing and explicitly scopes out the reconciliation agent loop, side-chat UI changes, and the full patch ledger (A71).

Technical Notes: Emphasizes “chat threads as substrate, not workflow state” and preserves existing knowledge graph tables/turn IDs while repointing the upward FK path.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread docs/design/MULTI_CHAT.md Outdated
Comment thread docs/design/MULTI_CHAT.md
Comment thread docs/design/MULTI_CHAT.md
lunelson
lunelson previously approved these changes May 6, 2026
Copy link
Copy Markdown
Contributor Author

kostandinang commented May 6, 2026

Merge activity

@kostandinang kostandinang changed the base branch from ka/fe-656-side-chat-v1-2e to graphite-base/90 May 6, 2026 16:27
@kostandinang kostandinang force-pushed the ka/fe-691-multi-chat-substrate branch from 7818813 to 7d46a40 Compare May 7, 2026 07:19
@kostandinang kostandinang changed the base branch from graphite-base/90 to ka/fe-656-side-chat-v1-2e May 7, 2026 07:19
@github-actions github-actions Bot dismissed lunelson’s stale review May 7, 2026 07:19

Latest approval commit 7818813 is not an ancestor of 7d46a40, indicating rewritten history after approval

@kostandinang kostandinang requested a review from lunelson May 7, 2026 07:36
lunelson
lunelson previously approved these changes May 7, 2026
Captures the §11 fidelity work as its own sub-slice of the V1.2 frontier
item. Implementation will follow on this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kostandinang and others added 17 commits May 7, 2026 11:11
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…the composer

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… canUndo

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces center-pill positioning (left-1/2 + translateX) with anchored
left-9 right-9 so the toast bar fills the available area between the +
and send buttons. Content stays centered inside via justify-between
(check + label on the left, Undo on the right).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…em heights

- Put h-72 directly on the <ul> for guaranteed scroll (the flex-1 + min-h-0
  pattern wasn't propagating height through the absolute-positioned wrapper).
- Drop px-2 from the <ul> so each item spans the full popover width and the
  hover background paints edge-to-edge.
- Move horizontal padding inside each item (px-3 on summary/div); body section
  uses pl-7 to stay aligned with summary text after the chevron.
- Tighten vertical rhythm: py-2.5 → py-2 between items.
- Bump body text size to text-sm with leading-relaxed and pt-1 spacing for
  comfortable reading when an item is expanded.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify substrate invariants and migration verification expectations so the design doc distinguishes DB constraints from application-layer checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang kostandinang force-pushed the ka/fe-691-multi-chat-substrate branch from 7d46a40 to ad95ed0 Compare May 7, 2026 09:13
@kostandinang kostandinang force-pushed the ka/fe-656-side-chat-v1-2e branch from 292b62a to a44c6bb Compare May 7, 2026 09:13
@github-actions github-actions Bot dismissed lunelson’s stale review May 7, 2026 09:14

Latest approval commit 7d46a40 is not an ancestor of ad95ed0, indicating rewritten history after approval

@kostandinang kostandinang requested a review from lunelson May 7, 2026 09:15
lunelson
lunelson previously approved these changes May 7, 2026
@graphite-app graphite-app Bot changed the base branch from ka/fe-656-side-chat-v1-2e to graphite-base/90 May 7, 2026 09:21
@graphite-app graphite-app Bot changed the base branch from graphite-base/90 to main May 7, 2026 09:51
Co-authored-by: Kostandin Angjellari <kostandinang@users.noreply.github.com>
@github-actions github-actions Bot dismissed lunelson’s stale review May 7, 2026 10:07

Manual conflict resolution detected after approval in merge commit 33db9aa for files: src/client/components/tests/side-chat-host.test.tsx,src/client/components/side-chat-host.tsx,src/client/routes/specification/$id/tests/structured-list-view.test.tsx

@kostandinang kostandinang requested a review from lunelson May 7, 2026 10:12
@lunelson lunelson merged commit 817e0c3 into main May 7, 2026
9 checks passed
@lunelson lunelson deleted the ka/fe-691-multi-chat-substrate branch May 7, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants