Skip to content

feat(workspace): prove suggestions and document fidelity - #53

Merged
Programcode merged 2 commits into
mainfrom
feat/debate-workspace-p0-2
Sep 20, 2026
Merged

Programcode merged 2 commits into
mainfrom
feat/debate-workspace-p0-2

Conversation

@Programcode

@Programcode Programcode commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • prove reviewable insert, delete, and format proposals remain outside accepted content
  • preserve unrelated collaborative edits and reject stale or overlapping targets without fuzzy replacement
  • prove relative anchors, local undo, and native Chromium IME composition
  • prove bounded Markdown, DOCX, and PDF semantic fidelity for English, Spanish, and Hungarian content

This is the second isolated Phase 0 gate. It adds no product route, database migration, or deployment.

Verification

  • focused review/conversion tests: 11 passed
  • native desktop Chromium IME gate: 1 passed
  • collaboration service: 10 passed
  • full unit suite: 1,142 passed
  • typecheck, lint, build, and diff check passed
  • Terra review: all Important findings addressed; no new findings

Deferred to owning slices

  • P3: editor capture UI, persistence/audit, comments, replies, mentions
  • P5.1: adversarial Markdown ceiling, unsafe import matrix, long URLs, multi-page tables
  • Production PDF route must retain Liberation Sans licensing obligations

Summary by CodeRabbit

  • New Features
    • Added collaborative workspace reviews with proposals for inserting, deleting, or formatting content, including accept, reject, and stale-change handling.
    • Added document conversion between workspace content and Markdown, HTML, DOCX, and PDF.
    • Added inline citations with safe rendering and fallback text support.
    • Added composition-aware editing for multilingual input, including Spanish and Hungarian text.
  • Bug Fixes
    • Improved handling of changed or overlapping review targets and quote anchors.
    • Added protection against unsafe links, scripts, styles, and malformed citations during document conversion.

@vercel

vercel Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Sep 20, 2026 5:41pm UTC

Copilot AI lite review requested due to automatic review settings September 20, 2026 17:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: bca141da-4b93-4922-8bfb-033c4b8c9c3d

📥 Commits

Reviewing files that changed from the base of the PR and between 7b1e20c and ed047b8.

📒 Files selected for processing (9)
  • .hermes/plans/2026-09-20_131317-debate-workspace.md
  • e2e/fixtures/workspace-review-ime.html
  • e2e/workspace-review-ime.spec.ts
  • src/lib/workspace/document-conversion.ts
  • src/lib/workspace/review.ts
  • src/lib/workspace/schema.ts
  • src/test/workspace/document-conversion.test.ts
  • src/test/workspace/fixtures/structured-speech.ts
  • src/test/workspace/review.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds document conversion for Markdown, HTML, DOCX, and PDF; collaborative review proposals with Yjs anchors; inline citations; multilingual fixtures; and IME-focused unit and end-to-end tests.

Changes

Workspace document interchange

Layer / File(s) Summary
Schema, conversion, and round-trip validation
src/lib/workspace/schema.ts, src/lib/workspace/document-conversion.ts, src/test/workspace/fixtures/structured-speech.ts, src/test/workspace/document-conversion.test.ts
Adds inline citations, schema-validated conversions, multilingual structured fixtures, and tests for Markdown, DOCX, PDF, and sanitized HTML behavior.

Workspace review proposals

Layer / File(s) Summary
Anchored proposal lifecycle and validation
src/lib/workspace/review.ts, src/test/workspace/review.test.ts
Adds insert, delete, and format proposals with pending, accepted, rejected, and stale states. Acceptance validates anchors, epochs, content, context, and overlap. Tests cover synchronized editors, undo/redo, stale proposals, and quote anchors.
IME composition validation
e2e/fixtures/workspace-review-ime.html, e2e/workspace-review-ime.spec.ts, .hermes/plans/2026-09-20_131317-debate-workspace.md
Adds a Chromium IME harness for Spanish and Hungarian composition. Proposals remain absent during composition and are created after settlement. The plan marks related validation tasks complete.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UserInput
  participant SuggestionEditor
  participant WorkspaceReview
  participant CanonicalEditor
  UserInput->>SuggestionEditor: enter composed text
  SuggestionEditor->>WorkspaceReview: create proposal after composition settles
  WorkspaceReview->>CanonicalEditor: validate and accept or reject hunks
  CanonicalEditor-->>WorkspaceReview: return canonical document state
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode
Programcode merged commit 483f47c into main Sep 20, 2026
7 checks passed
@Programcode
Programcode deleted the feat/debate-workspace-p0-2 branch September 20, 2026 17:53

This branch was successfully deployed

1 active deployment
Preview — ed047b84 Deployed Sep 20, 2026 by vercel[bot]
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.

2 participants