Commit graph

36 commits

Author SHA1 Message Date
Neeldhara Misra
59968be0c3 admin: computing-pi: add T2 2026-04-21 17:42:38 +05:30
Neeldhara Misra
01eebdd3de admin: computing-pi: add T1 2026-04-21 17:42:09 +05:30
Neeldhara Misra
dc9b38a402 admin: clear override after committing eternal-domination-game status 2026-04-21 17:40:09 +05:30
Neeldhara Misra
f2fc043b32 admin: set eternal-domination-game to draft 2026-04-21 17:40:08 +05:30
Neeldhara Misra
b38711b429 admin: override eternal-domination-game status to draft 2026-04-21 17:40:07 +05:30
Neeldhara Misra
a8e7a722e8 admin: clear override after committing eternal-domination-game status 2026-04-21 17:40:01 +05:30
Neeldhara Misra
a177f76745 admin: set eternal-domination-game to draft 2026-04-21 17:40:00 +05:30
Neeldhara Misra
5822a50de2 admin: override eternal-domination-game status to draft 2026-04-21 17:39:59 +05:30
Neeldhara Misra
26e543e230 admin: clear override after committing eternal-domination-game status 2026-04-21 17:39:47 +05:30
Neeldhara Misra
ca8acdd4ef admin: set eternal-domination-game to draft 2026-04-21 17:39:47 +05:30
Neeldhara Misra
07081e6547 admin: override eternal-domination-game status to draft 2026-04-21 17:39:45 +05:30
Claude
f527a712be
Implement neighbor-sum-avoidance polish + new computing-pi interactive
neighbor-sum-avoidance (T2-T6):
- Start button now reads just "Start" (no mode suffix).
- Available numbers and shuffled preview arrangements render pre-start
  so the arena isn't empty while the user is still deciding.
- Mode switch + count slider stay mounted once active; they're just
  disabled, so starting no longer causes a layout jump.
- Guided-mode instructions expanded to call out light grey edges, red
  violation arcs, and the green valid-neighbor line explicitly.
- Draggable numbers honor isActive for the draggable attribute and
  onDragStart, showing opacity-60 + cursor-not-allowed when locked.

computing-pi (new interactive under Miscellany):
- N parallel first-passage simulations: toss until heads > tails,
  record the fraction. Average × 4 converges to π.
- Header row: runs slider | live average × 4 | Start/Reset.
- Tile grid uses a mask-gradient marquee so long sequences scroll
  their tail while staying readable.
- Click any tile once all runs complete to see the full toss sequence
  in a Dialog.
- Safety cap of 1000 tosses per run (first-passage time has infinite
  expectation, so without the cap a pathological run could block).
- Registered in interactives.ts + InteractiveRenderer + the parallel
  interactive-components map. Filled in three-bank-accounts in the
  latter while there, since it was missing.

admin-data.json updated to mark T2-T6 done with remarks, remove the
implemented Computing Pi idea, and add an implementation note.
2026-04-21 11:58:45 +00:00
Claude
014d90a36b
CLAUDE.md: document Fizzy todo/idea mirror workflow
Agents processing todos/ideas from admin-data.json should mirror them
as cards on the author's Fizzy board. Slug → tag, progress → Review
column, staging branch link in the card description. PAT is read
from FIZZY_PAT env var; never hardcoded.
2026-04-21 11:12:45 +00:00
Neeldhara Misra
dc3c7ea094 admin: add idea "Computing Pi" 2026-04-21 16:39:01 +05:30
Claude
9dc0a68219
CLAUDE.md: redact admin password, add design & aesthetics section
- Replace literal admin password with a pointer to where it lives and
  the ADMIN_PASSWORD env var override.
- Add a design section covering the shadcn-first approach, OKLCH
  design tokens, mandatory dark-mode pairing, typography pairing
  (Castoro serif display + Imprima/Geist sans), radius scale, motion
  libraries and reduced-motion handling, and the tab/card/alert
  patterns that published interactives tend to share.
2026-04-21 10:40:02 +00:00
Claude
9e5538a73d
Add CLAUDE.md to orient future agents
Documents the three-place registration dance for interactives
(interactives.ts, InteractiveRenderer.tsx, interactive-components.ts),
the admin function's text-editing of source files, routing, and
Netlify-specific build workarounds.
2026-04-21 10:34:13 +00:00
Neeldhara Misra
e7dd3ed8eb admin: descriptive commit messages + dev-mode sync fallback
Server side: writeData() now takes a message, and each action in the
POST handler computes its own — e.g. "admin: add idea "Title"", "admin:
clear note on slug". For setTodos (which ships the whole blob), diff
old vs new per slug to produce messages like "neighbor-sum-avoidance:
add T6" or "mark T1 done, add T5".

Client side: syncFromServer() falls back to the bundled admin-data.json
when /api/admin is unreachable, so the admin panel reflects committed
state under `astro dev` (which doesn't run Netlify Functions).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:26:27 +05:30
Neeldhara Misra
0d0365cf6d admin: update admin data 2026-04-17 10:41:22 +05:30
Neeldhara Misra
c95b9aaa28 admin: update admin data 2026-04-17 10:40:00 +05:30
Neeldhara Misra
ac0e1013c9 admin: update admin data 2026-04-17 10:39:26 +05:30
Neeldhara Misra
3de9806fe7 admin: update admin data 2026-04-17 10:39:10 +05:30
Neeldhara Misra
0448c26220 admin: update admin data 2026-04-17 10:39:01 +05:30
Neeldhara Misra
486fd6aa2d admin: update admin data 2026-04-17 10:38:28 +05:30
Neeldhara Misra
46086795a2 admin: update admin data 2026-04-17 10:38:05 +05:30
Neeldhara Misra
1c754de4f7 neighbor-sum-avoidance: render arena pre-start with interactions disabled
Show the circle arena before the user clicks Start (greyed via
opacity-60 pointer-events-none), and guard drag/drop/click handlers on
isActive. Clicking Start enables interactions and kicks off the timer
as before. Also resync slot count with the Numbers slider while idle.

Marks T1 done.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 09:22:23 +05:30
Neeldhara Misra
fcbdcfccdf admin: update admin data 2026-04-17 04:01:45 +05:30
Neeldhara Misra
0c9940485d Remove debug logging from admin function
GitHub API working correctly with fine-grained PAT.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:58:55 +05:30
Neeldhara Misra
9f5fbd99aa Add debug logging to admin function 2026-04-17 03:57:35 +05:30
Neeldhara Misra
cb252a5841 trigger redeploy for env var update 2026-04-17 03:53:04 +05:30
Neeldhara Misra
96cc344391 Remove unused form.tsx to fix dev server warning
The form.tsx UI component imported react-hook-form and
@radix-ui/react-slot which aren't installed. Nothing uses
this component — removing it cleans up the dev server output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:50:35 +05:30
Neeldhara Misra
8e61afac2b Switch to standalone Netlify Function for admin API
Remove Astro adapter (causes esbuild bundling errors on Netlify)
and use a pure static build + standalone Netlify Function instead.

- Removed @astrojs/netlify adapter — site builds as fully static
- Created netlify/functions/admin.mts as a standalone Netlify Function
- Function handles all admin API operations via GitHub API
- Removed src/pages/api/admin.ts (Astro SSR route)
- Local dev: admin syncs to localStorage (server sync fails silently)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:44:01 +05:30
Neeldhara Misra
a90cd7283c Sanitize rollup chunk filenames for Netlify compatibility
Vite/Rollup generates chunk names with !~{} characters that cause
esbuild syntax errors on Netlify's build system. Added sanitizeFileName
to replace special characters with underscores.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:37:55 +05:30
Neeldhara Misra
11ab6c3b9f Fix esbuild charset and target for Netlify compatibility
Set esbuild charset to utf8 and target to es2022 to avoid
syntax errors from ASCII-escaped unicode in the bundled output
on Netlify's build environment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:34:37 +05:30
Neeldhara Misra
fd8bbe16e6 Add netlify.toml, disable JS/CSS post-processing
Netlify's asset post-processing was re-minifying Vite's output
and causing esbuild syntax errors. Disable it since Astro/Vite
already handles bundling and minification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:30:42 +05:30
Neeldhara Misra
9b182053f1 Switch to Netlify adapter with GitHub API persistence
- Swap @astrojs/node for @astrojs/netlify adapter
- Admin API reads/writes admin-data.json via GitHub API in production
- Status changes (commitStatus) and deletes commit directly to repo
- Env vars: ADMIN_PASSWORD, GITHUB_TOKEN
- Local dev falls back to filesystem (no env vars needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:22:18 +05:30
Neeldhara Misra
c5926b4213 Initial commit: Interactives site
Astro-based site with 40+ interactive math games, puzzles, and explorations.
Includes admin dashboard, todo system, blog, theme/subcategory navigation,
and embed pages for iframe embedding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 03:09:40 +05:30