Skip to content

[pull] main from tldraw:main#443

Merged
pull[bot] merged 2 commits intocode:mainfrom
tldraw:main
Mar 12, 2026
Merged

[pull] main from tldraw:main#443
pull[bot] merged 2 commits intocode:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Mar 12, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

steveruizok and others added 2 commits March 12, 2026 09:57
In order to automate routine PR maintenance tasks like resolving review
comments and fixing build failures, this PR adds a new Claude Code skill
called `shepherd-pr`.

The skill autonomously triages unresolved PR review threads into three
categories: false positives (already resolved in code), trivial fixes
(>=80% confidence mechanical changes), and items needing human input. It
also investigates build failures (lint, type errors, test failures, e2e
snapshot mismatches) and takes appropriate action for each category.

### Change type

- [x] `other`

### Test plan

- [ ] Invoke the skill on a PR with review comments and verify it
correctly triages and resolves threads
- [ ] Invoke the skill on a PR with build failures and verify it
correctly diagnoses issues

### Code changes

| Section        | LOC change |
| -------------- | ---------- |
| Config/tooling | +161 / -0  |

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Adds documentation/config for a new Claude skill but does not change
runtime application code or production behavior.
> 
> **Overview**
> Introduces a new Claude Code skill definition `shepherd-pr`
(`.claude/skills/shepherd-pr/SKILL.md`) to guide autonomous PR
maintenance.
> 
> The skill documents a workflow to fetch PR review threads via `gh`
GraphQL, triage unresolved comments (false positive vs trivial fix vs
needs human input), resolve threads with replies, and diagnose common CI
failures (lint/type/test/snapshot) with conservative guardrails and a
required end-of-session summary.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
410c930. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Closes #7749

In order to allow SDK users to persist and synchronize domain-specific
data that doesn't fit into shapes, bindings, or assets, this PR adds
support for custom record types in the tldraw store.

Custom record types are registered via a new `records` option on
`createTLSchema` and `createTLStore`. Each custom record type specifies
a scope (document/session/presence), a validator, optional migrations,
and optional default properties. Built-in type names are guarded against
collision.

The PR also adds TypeScript module augmentation support via
`TLGlobalRecordPropsMap`, so custom record types can be included in the
`TLRecord` union.

Original branch: `ds300/custom-record-types`

Almost entirely authored by @ds300 (David Sheldrick)


https://github.com/user-attachments/assets/55d3e131-c7f1-4969-9932-1598461d7689


https://github.com/user-attachments/assets/dd531c84-6a4b-4a98-bc4d-90ea9a50711f

### Change type

- [x] `feature`

### Test plan

1. Open the "Custom records" example at localhost:5420
2. Click "+ Add marker" to create map-pin markers on the canvas
3. Verify markers render at correct positions and follow camera movement
4. Right-click a marker to remove it

- [ ] Unit tests
- [ ] End to end tests

### API changes

- Added `CustomRecordInfo` interface for configuring custom record types
- Added `createCustomRecordId()` for creating custom record IDs
- Added `createCustomRecordMigrationIds()` for creating versioned
migration IDs
- Added `createCustomRecordMigrationSequence()` for defining custom
record migrations
- Added `isCustomRecord()` type guard for checking record type
- Added `isCustomRecordId()` type guard for checking record IDs
- Added `TLGlobalRecordPropsMap` interface for module augmentation
- Added `TLDefaultRecord`, `TLCustomRecord`, `TLIndexedRecords` types
- Changed `TLRecord` to union of `TLDefaultRecord | TLCustomRecord`
- Changed `createTLSchema()` to accept `records` option
- Changed `TLStoreSchemaOptions` to accept `records` option

### Release notes

- Add support for custom record types in the tldraw store, allowing SDK
users to persist and sync domain-specific data alongside built-in
records.

### Code changes

| Section         | LOC change |
| --------------- | ---------- |
| Core code       | +444 / -21 |
| Automated files | +46 / -2   |
| Documentation   | +244 / -0  |

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Adds new extensibility points to `createTLSchema`/`createTLStore` and
broadens the `TLRecord` type, which can affect validation/migrations and
any code assuming only built-in record types.
> 
> **Overview**
> Adds support for registering **custom record types** in the tldraw
store via a new `records` option on `createTLSchema` and
`createTLStore`, including validation, scope, default properties, and
optional migrations (with a guard to prevent collisions with built-in
type names).
> 
> Introduces a new `TLCustomRecord` API surface (`CustomRecordInfo`,
`createCustomRecordId`, migration helpers, and
`isCustomRecord`/`isCustomRecordId`) and updates `TLRecord` typing to
include custom records via `TLGlobalRecordPropsMap` module augmentation.
> 
> Adds a new examples page (`Custom records`) demonstrating a
persisted/synced `marker` custom record rendered as a canvas overlay,
plus regenerated API reports.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1e40a2b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Mar 12, 2026
@pull pull Bot added the ⤵️ pull label Mar 12, 2026
@pull pull Bot merged commit 0666ccb into code:main Mar 12, 2026
@pull pull Bot had a problem deploying to deploy-production March 12, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging March 12, 2026 15:13 Error
@pull pull Bot had a problem deploying to deploy-staging March 12, 2026 15:13 Error
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant