Skip to content

Platform build backlog: render-token UI, AI Copilot, repositioning, Dataset Library UI - #6

Merged
guillaumelauzier merged 4 commits into
mainfrom
claude/generatedart-backend-fixes-dmhq3v
Aug 21, 2026
Merged

Platform build backlog: render-token UI, AI Copilot, repositioning, Dataset Library UI#6
guillaumelauzier merged 4 commits into
mainfrom
claude/generatedart-backend-fixes-dmhq3v

Conversation

@guillaumelauzier

@guillaumelauzier guillaumelauzier commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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) and client/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.ts gets 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.yml had 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

  • Typecheck clean throughout (npm run typecheck, plus a manual strict tsc pass over every new/changed client/*.ts file, since client/ isn't in tsconfig's include).
  • 33/33 unit tests, 143/143 smoke checks (7 new for the Copilot routes) passing against a live wrangler dev instance.
  • wrangler deploy --dry-run clean on both environments.
  • Full Jekyll build succeeds; verified balanced markup on every touched/new page.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QuSa99HABSrWRarT9BQ5Tz

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
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

claude added 3 commits August 21, 2026 17:17
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 guillaumelauzier changed the title Add render-token service UI: Wallet + Model Studio pages Platform build backlog: render-token UI, AI Copilot, repositioning, Dataset Library UI Aug 21, 2026
@guillaumelauzier
guillaumelauzier marked this pull request as ready for review August 21, 2026 19:07
@guillaumelauzier
guillaumelauzier merged commit fc04667 into main Aug 21, 2026
2 checks passed
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