Skip to content

drafts less docsy - #67

Merged
chee merged 1 commit into
mainfrom
drafty
Sep 23, 2026
Merged

chee merged 1 commit into
mainfrom
drafty

Conversation

@chee

@chee chee commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

don't do some much draftsting when drafts isn't open

@patchcrow

patchcrow commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

🪡 Patchwork preview

Torn down.

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 review overview

🟡 Changes recommended

Incremental edit counting can misclassify operations within subsequently deleted metadata objects.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Reduces persistent draft bookkeeping and makes timeline grouping lazy and more efficient.

Changes:

  • Reuses checkout documents and lazily creates draft metadata.
  • Reworks actor attribution and change grouping around operation counts.
  • Updates Patchwork dependencies and adds edit-count tests.
File Description
drafts/​src/​providers/​DraftStateProvider.ts Lazily manages draft state, grouping, and attribution.
drafts/​src/​DraftsSidebar.tsx Prevents writes after sidebar disposal.
drafts/​src/​change-group-cache.ts Introduces operation-based edit counting and caching.
drafts/​src/​change-group-cache.test.ts Tests operation counts against diff counts.
drafts/​src/​actor-attribution.ts Watches writable documents for attributable edits.
drafts/​package.json Updates Patchwork dependencies.
drafts/​pnpm-lock.yaml Locks updated dependency graph.
Files not reviewed (1)
  • drafts/pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +177 to +178
const skipObjs = new Set<string>();
objectIdsUnder((doc as Record<string, unknown>)["@patchwork"], skipObjs);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@paulsonnentag does this make sense?

@chee
chee marked this pull request as ready for review September 23, 2026 10:07
@chee
chee merged commit 9101c80 into main Sep 23, 2026
8 checks passed
@chee
chee deleted the drafty branch September 23, 2026 13:18
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.

4 participants