Skip to content

Restore markdown editor and implement seed packet features - #63

Closed
mberrys wants to merge 4 commits into
mainfrom
cursor/seed-packets-v0-1-013a
Closed

mberrys wants to merge 4 commits into
mainfrom
cursor/seed-packets-v0-1-013a

Conversation

@mberrys

@mberrys mberrys commented Aug 30, 2026

Copy link
Copy Markdown
Owner

No description provided.

cursoragent and others added 4 commits August 12, 2026 19:21
The editor on this branch was a broken mix of TipTap and markdown that
did not parse. Restore the textarea editor so documents can be read and
typed, matching the existing e2e selectors.

Co-authored-by: michael berry <mberrys@users.noreply.github.com>
Replace the hardcoded first-run seed with a SeedPacket registry. An empty
workspace offers a picker; planting sprouts docs, opens the packet's panes,
and records origin in workspace meta and .rrspace export.

Welcome is packet garden/welcome. History seminar, grant shop, and field
notes ship as distinct profession packets with extra recipes and prompt
addenda.

Co-authored-by: michael berry <mberrys@users.noreply.github.com>
Playwright's Welcome to garden name match hit sidebar, tab, and action
buttons. Wait for .rr-markdown instead.

Co-authored-by: michael berry <mberrys@users.noreply.github.com>
- Extend SeedPacket contract (version, starterBases, links, layout, requires)
- Add database doc kind with grid/kanban views and relation fields
- Ship comms/campaign proof packet with linked bases and sample rows
- Persist seedPacketVersion in workspace meta and .rrspace exports
- Complex packet preview and capability gating in picker

Refs #8 #18

Co-authored-by: michael berry <mberrys@users.noreply.github.com>
@mberrys

mberrys commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0e66adbde

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/ops/database.ts
Comment on lines +197 to +201
inverse.push({
op: "addField",
field: removed as unknown as { type: DatabaseField["type"] } & Record<string, unknown>,
index,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve cell contents when undoing field deletion

When a populated field is removed, the inverse records only an addField operation while the forward path deletes that field's value from every row. Consequently, accepting a deleteField suggestion and then using Undo recreates an empty column rather than restoring its data, so the database reducer does not provide the exact inverse expected by workspace history.

Useful? React with 👍 / 👎.

Comment thread src/lib/packets/sprout.ts
Comment on lines +41 to +43
for (const baseSeed of packet.starterBases ?? []) {
const dbDoc = databaseFromSeed(baseSeed, localToId);
localToId.set(baseSeed.localId, dbDoc.id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preallocate base IDs before resolving relations

A schema-valid packet can declare a relation to a base that appears later in starterBases, but that later base has not yet been added to localToId when databaseFromSeed resolves the field, causing planting to throw an unresolved-target error. Either allocate IDs for every base before building any of them or reject forward references during packet validation.

Useful? React with 👍 / 👎.

Comment on lines +123 to +127
{listPackets().map((packet) => (
<MenuItem
key={packet.id}
icon={<Sprout size={14} />}
onClick={() => void plantPacket(packet.id)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Send complex sidebar packets through preview

Selecting a seed packet from the sidebar calls plantPacket directly, bypassing both packetNeedsPreview and the preview confirmation used by the picker. Thus choosing a complex packet such as Campaign from an existing workspace immediately appends all of its artifacts and replaces the pane layout without showing the promised artifact/link preview; route this action through the picker or equivalent confirmation.

Useful? React with 👍 / 👎.

Comment on lines +276 to +279
const columnRows = rows.filter((row) => {
const val = row.cells[view.groupFieldId];
return val === option || (option === "Unassigned" && !val);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle arrays when grouping multi-select Kanban views

When a Kanban view groups on a multi_select field, its cell value is an array, so val === option is always false. Nonempty arrays are also truthy and therefore do not enter the Unassigned column, making every tagged row disappear from the board; test array membership for multi-select grouping.

Useful? React with 👍 / 👎.

Comment on lines +396 to +400
return (
<input
type={field.type === "url" ? "url" : field.type === "date" ? "date" : "text"}
value={typeof value === "string" ? value : ""}
onChange={(e) => onChange(e.target.value)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add a real editor for multi-select cells

A multi_select field falls through to this scalar text input. Correct array values therefore render as an empty string, and the first edit replaces the array with a string, making the newly exposed field type unusable and semantically corrupting its cell value; render and emit arrays for this field type instead.

Useful? React with 👍 / 👎.

@mberrys

mberrys commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded. cursor/seed-packets-v0-1-013a was one agent's version of the seed-packets work; main already merged the newer port via PRs #49/#50/#57/#59/#61. Main's sprout.ts blob is byte-identical to this branch's, and the rest of the packet/database code is a direct descendant. Merging as-is would regress ~24 shared files to their older forms (main now has sheets, media, mini, pdf, and deck surfaces on top), and the only file this branch adds that main lacks (src/lib/text/safe-href.ts) is unused.

The review comments (deleteField undo, multi_select kanban grouping/editor, sprout forward-refs, sidebar preview) flagged real bugs still live in main. I ported all of them to main in PR #67 (merged): those fixes are now on main.

@mberrys mberrys closed this Sep 5, 2026
@mberrys
mberrys deleted the cursor/seed-packets-v0-1-013a branch September 5, 2026 20:44
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