Skip to content

Conversation

@jakedahn
Copy link
Contributor

@jakedahn jakedahn commented Oct 6, 2025

Summary by cubic

Migrates the tutorials into this repo and sets up a MyST-powered docs site with automatic GitHub Pages deployment at docs.commontools.dev. Adds CI to build on pushes and PRs, plus local tooling for easy authoring.

  • New Features

    • Ported tutorials into tutorials/ as a MyST site (index, install-ct, llm-builtin, state, state_modify, common_ui, cts, images, TSX samples).
    • Added site config and tooling: myst.yml, package.json/scripts, package-lock.json, .nvmrc, .gitignore.
    • Configured custom domain via CNAME (docs.commontools.dev).
    • Added GitHub Actions workflow to build and deploy on pushes to main and migrate-tutorials; PRs build for validation only.
  • Migration

    • Docs build uses Node/mystmd (separate from the Deno runtime).
    • Local dev: cd tutorials; npm ci; npm run dev. Deployment is handled by CI.

jakedahn and others added 4 commits October 6, 2025 10:33
- Create deploy-docs.yml workflow to build and deploy MyST docs
- Trigger on main branch changes to tutorials/ directory
- Configure MyST for docs.commontools.dev custom domain
- Add CNAME file for GitHub Pages custom domain
- Document build process in README_BUILD.md
- Update MyST config with project metadata and base URL

The workflow uses Node.js for MyST builds (separate from Deno codebase)
and deploys static documentation to GitHub Pages automatically.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add migrate-tutorials branch to workflow triggers
- Enable workflow for pull requests (build-only)
- Restrict deployment to push events on main and migrate-tutorials
- PRs will build but not deploy (validation only)

This allows testing the deployment from the migration branch before merging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

5 issues found across 36 files

Prompt for AI agents (all 5 issues)

Understand the root cause of the following 5 issues and fix them.


<file name="tutorials/cts.md">

<violation number="1" location="tutorials/cts.md:9">
Typo: “succint” should be spelled “succinct.”</violation>
</file>

<file name="tutorials/state.md">

<violation number="1" location="tutorials/state.md:27">
This example also fails to close recipe(), so the snippet is invalid TypeScript. Please end it with `});`.</violation>
</file>

<file name="tutorials/common_ui.md">

<violation number="1" location="tutorials/common_ui.md:266">
Update the ct-screen example to use the header slot so the toolbar renders in the fixed header area.</violation>

<violation number="2" location="tutorials/common_ui.md:310">
Fix the visual components list to refer to ct-kbd so readers use the correct element name.</violation>
</file>

<file name="tutorials/.nvmrc">

<violation number="1" location="tutorials/.nvmrc:1">
Update the .nvmrc to a supported Node.js release (Node 18 went end-of-life on 2025-04-30), so local docs builds run on a maintained runtime.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

keywords: commontools, recipes, cts, types
abstract: |
The CTS (Common Type System) helps automatically convert types and common
coding patterns for you. This leads to more readable and succint code.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 6, 2025

Choose a reason for hiding this comment

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

Typo: “succint” should be spelled “succinct.”

Prompt for AI agents
Address the following comment on tutorials/cts.md at line 9:

<comment>Typo: “succint” should be spelled “succinct.”</comment>

<file context>
@@ -0,0 +1,15 @@
+keywords: commontools, recipes, cts, types
+abstract: |
+  The CTS (Common Type System) helps automatically convert types and common
+  coding patterns for you. This leads to more readable and succint code.
+  In this section, we will go over the basic features offered by CTS.
+---
</file context>
Suggested change
coding patterns for you. This leads to more readable and succint code.
coding patterns for you. This leads to more readable and succinct code.
Fix with Cubic

```{code-block} typescript
export default recipe("state test", () => {
const characterName = cell<string>("");
}
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 6, 2025

Choose a reason for hiding this comment

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

This example also fails to close recipe(), so the snippet is invalid TypeScript. Please end it with });.

Prompt for AI agents
Address the following comment on tutorials/state.md at line 27:

<comment>This example also fails to close recipe(), so the snippet is invalid TypeScript. Please end it with `});`.</comment>

<file context>
@@ -0,0 +1,230 @@
+```{code-block} typescript
+export default recipe(&quot;state test&quot;, () =&gt; {
+  const characterName = cell&lt;string&gt;(&quot;&quot;);
+}
+```
+Here, we have created a cell with a type argument of `string`,
</file context>
Suggested change
}
});
Fix with Cubic

- gap: `ct-icon` (and `ct-label` has an optional in-built icon)
- gap: icon set?

- visual: `ct-kdb`, `ct-separator`, `ct-table`, `ct-tool-call`
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 6, 2025

Choose a reason for hiding this comment

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

Fix the visual components list to refer to ct-kbd so readers use the correct element name.

Prompt for AI agents
Address the following comment on tutorials/common_ui.md at line 310:

<comment>Fix the visual components list to refer to ct-kbd so readers use the correct element name.</comment>

<file context>
@@ -0,0 +1,365 @@
+- gap: `ct-icon` (and `ct-label` has an optional in-built icon)
+    - gap: icon set?
+
+- visual: `ct-kdb`, `ct-separator`, `ct-table`, `ct-tool-call`
+	- gap: `ct-img` or `ct-media`
+
</file context>
Suggested change
- visual: `ct-kdb`, `ct-separator`, `ct-table`, `ct-tool-call`
- visual: `ct-kbd`, `ct-separator`, `ct-table`, `ct-tool-call`
Fix with Cubic


```{code-block} html
<ct-screen>
<ct-toolbar slot="top">
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 6, 2025

Choose a reason for hiding this comment

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

Update the ct-screen example to use the header slot so the toolbar renders in the fixed header area.

Prompt for AI agents
Address the following comment on tutorials/common_ui.md at line 266:

<comment>Update the ct-screen example to use the header slot so the toolbar renders in the fixed header area.</comment>

<file context>
@@ -0,0 +1,365 @@
+
+```{code-block} html
+&lt;ct-screen&gt;
+    &lt;ct-toolbar slot=&quot;top&quot;&gt;
+        &lt;ct-button&gt;hello&lt;/ct-button&gt;
+    &lt;/ct-toolbar&gt;
</file context>
Suggested change
<ct-toolbar slot="top">
<ct-toolbar slot="header">
Fix with Cubic

@@ -0,0 +1 @@
18
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 6, 2025

Choose a reason for hiding this comment

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

Update the .nvmrc to a supported Node.js release (Node 18 went end-of-life on 2025-04-30), so local docs builds run on a maintained runtime.

Prompt for AI agents
Address the following comment on tutorials/.nvmrc at line 1:

<comment>Update the .nvmrc to a supported Node.js release (Node 18 went end-of-life on 2025-04-30), so local docs builds run on a maintained runtime.</comment>

<file context>
@@ -0,0 +1 @@
+18
</file context>
Suggested change
18
20
Fix with Cubic

jakedahn and others added 2 commits October 6, 2025 11:05
- Add tutorials/ to fmt.exclude in deno.json
- Format deploy-docs.yml to match Deno style guidelines
- Ensures tutorials with different formatting rules don't break CI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove migrate-tutorials branch from deployment triggers
- Remove PR builds entirely
- Only build and deploy when tutorials/ directory changes on main
- Manual workflow dispatch still available for emergency deployments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jakedahn jakedahn merged commit 6328ee9 into main Oct 6, 2025
1 check passed
@jakedahn jakedahn deleted the migrate-tutorials branch October 6, 2025 17:30
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