Skip to content

Plan 5a: Customizations page#15

Merged
theaboutbox merged 6 commits intoadmin-overhaulfrom
admin-overhaul-5a-customizations
Apr 30, 2026
Merged

Plan 5a: Customizations page#15
theaboutbox merged 6 commits intoadmin-overhaulfrom
admin-overhaul-5a-customizations

Conversation

@theaboutbox
Copy link
Copy Markdown
Contributor

Summary

Plan 5a of 5. Replaces the customizations route stub with a real page that walks custom/ and reports which files shadow upstream and which are additive.

  • New listCustomizations() helper in src/customizations.ts — pure filesystem read; categorizes pipeline / step / provider / other; checks upstream presence via fs.existsSync; skips README.md, .gitkeep, dotfiles; uses readdirSync({ withFileTypes: true }) so symlinks are silently skipped (no loop risk).
  • New auth-protected GET /api/customizations returns { customRoot, customizations }.
  • New page src/admin-ui/pages/customizations.ts — info banner about custom/, table with Path / Category / Status / Upstream / Size / Modified, empty + error states, 60s auto-refresh.
  • Stub removed.
  • 5 helper tests (sandbox tmp dirs) + 2 endpoint tests + 5 structural page tests.
  • 6 commits; 654 tests pass.

Plan: docs/superpowers/plans/2026-04-30-admin-customizations.md. PR base: admin-overhaul.

Test plan

  • #customizations lists every file under custom/ (e.g., custom/steps/hello.ts)
  • Override status badge shows "Override" for files whose upstream exists, "Additive" otherwise
  • README.md and .gitkeep files are not shown
  • Empty fork (no custom/ files) shows the empty state
  • 60s auto-refresh

🤖 Generated with Claude Code

theaboutbox and others added 6 commits April 30, 2026 13:40
Walk custom/ directory, categorize files as pipeline/step/provider/other,
detect upstream shadows, and return sorted entries with stat metadata.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wire GET /api/customizations to listCustomizations() behind existing
session auth, and add two tests (401 + 200 shape) to admin.test.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HTML section with table of custom/ files, badges for category/status,
size + modified columns. Script uses window.api/window.esc only,
const/let only, 60s auto-refresh, registers via window.registerPage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Import and inject customizationsHtml/Script into the admin shell.
Remove the 'customizations' stub entry from stubs.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Five assertions: expected IDs present, route registration, API call,
window.api/esc-only usage, no var declarations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@theaboutbox theaboutbox merged commit 83fffc1 into admin-overhaul Apr 30, 2026
1 of 2 checks passed
@theaboutbox theaboutbox deleted the admin-overhaul-5a-customizations branch April 30, 2026 20:06
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.

1 participant