Platform build backlog: render-token UI, AI Copilot, repositioning, Dataset Library UI - #6
Merged
Conversation
Item 2 of the platform build backlog (design spec: Step 6 of the published design brief). The render-token API (PR #4) had no frontend — every wallet, catalogue, and publish interaction had to go through raw fetch calls. This adds the two Jekyll pages and their client TypeScript, matching the existing client/*.ts + esbuild build:* convention (fetchJson helper, escapeHtml, event-delegated forms, Bootstrap modals, brand.css tokens only). - client/wallet.ts + wallet/index.html: balance hero, token packs, on-chain purchase (send ETH to the treasury address, wait for the receipt, POST the tx hash to confirm — same wallet-connect + send-tx shape client/mint.ts already uses), and paginated ledger history. - client/models.ts + models/index.html + models/detail/index.html: public catalogue with a kind filter, "your models" + publish-a-model modal, and model detail (query-string routed like /p/?id=N and /t/?p=N&id=T, since Jekyll can't statically generate a page per D1 row) with the version/provenance list, an owner-only publish-version form whose fields adapt to the model's provider (training method / base model / dataset note / weights_ref only for fal_custom; system prompt only for code kind), and a render form with the cost shown before the click. - package.json: build:wallet / build:models scripts, wired into build:all. Testing: both new client files pass a manual strict tsc pass (client/ isn't in tsconfig's include, so this is on top of, not instead of, the project's own `npm run typecheck`) and bundle cleanly with esbuild; caught and fixed two real type issues in the process (a possibly-null form-field chain, and an `EIP1193Provider.request` overload mismatch from a `Hex | null` field passed where TS needs local narrowing to `Hex`). Full Jekyll build (`./bin/jekyll build`) succeeds with the three new pages producing balanced markup and no unresolved Liquid. API unit suite still 33/33. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QuSa99HABSrWRarT9BQ5Tz
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
generatedart | 87d1b96 | Commit Preview URL Branch Preview URL |
Aug 21 2026, 05:31 PM |
Item 3 of the platform build backlog (design spec: Step 5 of the
published design brief). Studio (the p5.js/three.js code editor) gets
an AI assistant of its own — generate a sketch from a prompt, edit the
current one by instruction, get a plain-language explanation, or have
tunable parameters guessed from the code.
- src/ai/copilot.ts: four thin wrappers around the Anthropic SDK
(generate/edit/explain/params), kept deliberately separate from the
render-model marketplace (src/ai/inference.ts) even though both call
Claude — a model registry entry is a creator-published, token-metered
product someone else renders; the copilot is a fixed platform feature
tied to a project's own code, not something a creator publishes.
- src/projects/ai.ts: four owner-only routes
(/v1/projects/:id/ai/{generate,edit,explain,params}), each debiting
the SAME render-token ledger the marketplace uses (one currency
platform-wide) before the call and refunding in full on failure —
same discipline as render_jobs, without a persisted job row, since
these are ephemeral editor assists rather than published, re-runnable
renders.
- AI_MOCK (opt-in, same convention as RENDER_MOCK/TRAINING_MOCK;
production must never set it) for canned, network-free responses.
- client/studio.ts + studio/index.html: a collapsible Copilot panel
(mode tabs, live token balance, cost-before-run) added to the
existing editor/preview grid. Generate and edit return a full
revised source, presented as an accept-or-reject suggestion rather
than per-hunk diff hunks — stated in code comments as a deliberate
v1 simplification (true reviewable diffing needs a diff-rendering
library not yet in this project's dependencies), not a silently
under-delivered feature. Accepting replaces the CodeMirror buffer
and marks it dirty, so the existing Save/Cmd-S flow picks it up
unchanged.
Testing: typecheck clean; 33/33 unit tests; 7 new smoke checks (all
four actions under AI_MOCK, empty-instruction rejection, ledger debit
total, non-owner 403) — 143/143 total pass; wrangler deploy --dry-run
clean on both environments; full Jekyll build succeeds with balanced
markup on the modified studio page.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuSa99HABSrWRarT9BQ5Tz
Item 4 of the platform build backlog (design spec: Step 7 of the
published design brief). AI art models become the platform's flagship
creative unit, disclosed provenance is the trust mechanic, and
hand-coded p5.js/three.js/GLSL work is explicitly named "Code
Sketches" — a respected, fully-supported second lane, never demoted.
REAL BUG FOUND AND FIXED, not just copy: every single page on the
site — every one built this session and before — was rendering the
unmodified theme demo navigation ("Home", "Elements", a megamenu full
of "Digital Startup"/"SaaS Landing"/etc.). Both nav-1.html (used by
the homepage) and nav-10.html (used by every inner page: /t/,
/galleries/, /wallet/, /models/, /studio/, ...) read from the same
_data/navigation.yml, which had never been customized past the theme's
demo content. _data/navigation.yml now holds the platform's real
top-level nav: Models, Explore, Galleries, Briefs, About, Dashboard —
Models first, matching the repositioning. Verified by grepping
rendered nav-link text on the homepage and an inner page post-build.
- index.html: hero rewritten (dual CTA — "Train a model" first,
"Code a sketch" second, matching the design brief's model-training-
listed-first instruction), the three-column Code Sketch explainer
gets an intro line + a link to the Model path, the manifesto's "No
ML-generated images" bullet — which flatly contradicted the new
positioning — replaced with a provenance-disclosure bullet, and
three new tiles (AI art models / Token wallet / Studio Copilot)
added to the "what's live" grid (six → nine surfaces).
- about/index.html: origin story rewritten around the AI Art Creative
Coding thesis — code is the medium whether it's a sketch or a
model's architecture/training config; names the dataset-trained-
generative-systems lineage without claiming affiliation; "What we
believe" gains a provenance-disclosure belief and the "repo is the
artwork" belief is widened to cover trained models; tech-stack
paragraph now mentions Claude + fal.ai alongside the existing stack.
- explore/index.html: retitled "Explore code sketches" with a
prominent link to /models/ — Explore's own tab-fetching logic isn't
touched here (adding a true in-Explore Models tab is real feature
work, called out as follow-up, not silently done as "just copy").
- _config.yml: site-wide description (used in every page's meta tags)
updated to match.
Full Jekyll build succeeds; verified balanced markup on every touched
page and confirmed the anti-ML line is gone site-wide via grep. API
test suite untouched by this item — still 33/33.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuSa99HABSrWRarT9BQ5Tz
Item 5 of the platform build backlog (design spec: Step 9 of the published design brief). Scoped honestly, not the full Step 9 vision: this ships the Dataset Library UI (item 1's backend had zero frontend until now) plus a real, working tie-together of the four systems that actually exist — Projects, Datasets, Models, Wallet. Collaboration (shared-dataset roles, co-created models), Integrations (API keys, webhooks), and critique threads have no backend at all yet and aren't faked here — building the full workspace shell means building those first, tracked as follow-up rather than stubbed. - client/datasets.ts + datasets/index.html + datasets/detail/index.html: the library (create, list, rights declaration shown plainly as a signing moment, not checkbox theater) and detail (drag-and-drop upload with per-batch success/duplicate/failure counts, item grid with delete, and the train-a-model form). Dataset item thumbnails load via `<img crossorigin="use-credentials">` against the owner-only file-proxy endpoint from PR item 1 — datasets are private by default and have no public image URLs the way project captures do. - client/lib/trainableBaseModels.ts: a small client-side mirror of ai/training.ts's TRAINABLE_BASE_MODELS (presentation labels only — the server re-validates every value regardless of what this list offers, so the two can't drift into a security issue, only a stale label). - Training-job list polls every 4s while any job is queued/training — genuinely necessary for production (fal.ai training takes minutes to hours) even though TRAINING_MOCK completes synchronously in dev. - client/dashboard.ts + dashboard/projects/index.html: three quiet workspace tiles (Datasets count, Models count, Wallet balance) above the existing project grid, each a best-effort fetch that degrades to "—" rather than blocking the rest of the dashboard on failure. - Datasets deliberately isn't added to the top-level public nav, same reasoning as Wallet: it's creator-tool content, reachable from the Dashboard rather than a destination in the public discovery nav (Models/Explore/Galleries/Briefs/About). Testing: typecheck clean (including a manual strict pass over the new client files, same as prior UI items); esbuild bundles cleanly; full Jekyll build succeeds with balanced markup on every touched page; API unit suite still 33/33 (unchanged — this item is frontend-only, consuming endpoints items 1 and 3 already shipped and tested). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QuSa99HABSrWRarT9BQ5Tz
guillaumelauzier
marked this pull request as ready for review
August 21, 2026 19:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR grew across four consecutive backlog items (a fifth, the Dataset Library backend, merged separately in #5) as part of one continuous build session — each committed and verified independently, all landing on this branch because #5 merged mid-session and left this one open as the active PR. Summary below; full detail is in each commit message.
Item 2 — Render-token service UI (Wallet + Model Studio)
The render-token API (merged in #4) had no frontend. Adds
client/wallet.ts+wallet/index.html(balance, packs, on-chain purchase, ledger) andclient/models.ts+models/index.html+models/detail/index.html(catalogue, publish flow with provider-adaptive fields, render form with cost-before-click).Item 3 — Studio Copilot
src/ai/copilot.ts+src/projects/ai.ts: four owner-only routes (/v1/projects/:id/ai/{generate,edit,explain,params}), deliberately separate from the render-model marketplace even though both call Claude. Debits the same render-token ledger, refunds on failure.client/studio.tsgets a collapsible Copilot panel — generate/edit return a full revised suggestion (accept/reject), stated as a v1 simplification rather than true per-hunk diffing (no diff-rendering library in this project yet).Item 4 — Reposition as AI Art Creative Coding
AI art models become the flagship creative unit; Code Sketches remain a fully respected second lane. Real bug found and fixed along the way: every page site-wide was rendering the unmodified theme demo nav (
_data/navigation.ymlhad never been customized) — now holds the real nav (Models, Explore, Galleries, Briefs, About, Dashboard). Homepage hero, About page, and Explore page copy rewritten; the homepage manifesto's "No ML-generated images" bullet — which flatly contradicted the new positioning — replaced with a provenance-disclosure bullet.Item 5 — Dataset Library UI + workspace tie-together
client/datasets.ts+datasets/index.html+datasets/detail/index.html: the Dataset Library backend (merged in #5) had zero frontend until now — create, upload (drag-and-drop with per-batch success/duplicate/failure counts), item grid, and the train-a-model form, with training-job polling since real training is async (minutes to hours). Dashboard gains three workspace tiles (Datasets/Models/Wallet). Scoped honestly: Collaboration and Integrations from the design brief's full Step 9 vision have no backend yet and aren't faked here.Testing
npm run typecheck, plus a manual stricttscpass over every new/changedclient/*.tsfile, sinceclient/isn't in tsconfig'sinclude).wrangler devinstance.wrangler deploy --dry-runclean on both environments.🤖 Generated with Claude Code
https://claude.ai/code/session_01QuSa99HABSrWRarT9BQ5Tz