Skip to content

Conversation

@bfollington
Copy link
Contributor

@bfollington bfollington commented Aug 26, 2025


Summary by cubic

Consolidated all recipe development docs under docs/common and updated references for a single, consistent source of truth (addresses CT-815). ct init now bundles these docs and copies them to .ct-docs for easy, offline access.

  • New Features

    • ct init copies docs/common to .ct-docs in new workspaces.
    • Build includes docs/common in the compiled CLI binary.
    • Added docs: RECIPES.md, HANDLERS.md, COMPONENTS.md; moved CT.md.
  • Refactors

    • Updated commands, agents, and README to point to docs/common/CT.md.
    • Adjusted scripts to search docs in docs/common instead of recipes/.
    • Minor doc cleanups for consistency and links.

@linear
Copy link

linear bot commented Aug 26, 2025

@bfollington bfollington requested a review from jsantell August 26, 2025 04:18
@bfollington
Copy link
Contributor Author

@jsantell tagging you because I thought of a potentially clever/stupid idea: I made ct init copy the contents of the (newly formed) docs/common into a .ct-docs folder.

Previously, these files were in our recipes repo but we elected that they belong in labs after discussion. These files were designed for 'end users' who are developing recipes themselves and our recipes repo is our attempt to simulate that, so I think having ct able to bundle the docs may be the best of both worlds?

This is but one part of a broad effort to clean up our .md files.

Copy link
Collaborator

@jsantell jsantell left a comment

Choose a reason for hiding this comment

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

looks good! handful of comments

### Conditional State Updates
```typescript
const toggleItem = handler<
Record<string, never>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typing these events would go a long way it seems, let's talk more on how we can do this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yah I don't know how to make the types easily available, but odds are most of the events take the shape:

type CommonEvent<T> = {
  detail: T
}

Copy link
Contributor

Choose a reason for hiding this comment

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

And this is a bit to be congruent with DOM events, but we should discuss whether we really want to carry this over to events that are clearly not DOM. Any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the ct- components it seems reasonable to use detail and since these sometimes appear in a lit context outside of recipes where DOM conventions are expected?

Regardless of structure, what we need to do is associate the event types with the onClick etc. bindings via jsx.d.ts somehow so the handlers can infer the type... Seems tricky but possible.

@bfollington bfollington merged commit 798cb4e into main Sep 2, 2025
7 checks passed
@bfollington bfollington deleted the ben/ct-815-review-md-docs-for-inconsistencies branch September 2, 2025 00:32
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