Skip to content

Wire up Prefix mode in the operator console - #25

Merged
cable8mm merged 1 commit into
mainfrom
prefix-purge-mode
Oct 19, 2026
Merged

cable8mm merged 1 commit into
mainfrom
prefix-purge-mode

Conversation

@cable8mm

@cable8mm cable8mm commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Implement the Prefix mode execute flow in src/main.ts, which previously always rendered 'Prefix 모드는 아직 지원하지 않습니다.' regardless of input.
  • A non-empty path sends { mode: 'prefix', service, path } to /purge/execute (backend validation in src/purge.ts — V4, V5 — was already implemented and tested, just not reachable from the UI).
  • An empty path shows a confirm() dialog naming the selected service before resending with confirmation set, per PRODUCT_SPEC.md V5 / A5 and the ARCHITECTURE.md resolved decision that typing the service name is not required.
  • The path input switches to a single row and its placeholder shows a full img.repl.net image URL in Prefix mode, matching the intended "paste a URL, trim it from the right into a prefix" workflow.

Note

.replworks/TASKS.md already marks T-007 ("Purge image URL prefixes") [X], but the operator console never actually exercised this path until now — flagged as a doc/code conflict in an earlier discussion. This PR only wires up the UI; it does not change .replworks/TASKS.md, and a live-Cloudflare E2E run (per T-007's full acceptance criteria) has not been performed against real credentials.

Test plan

  • npm run typecheck
  • npm test (28 tests pass; backend prefix validation already covered)
  • npm run build
  • Manually verified in a browser against the local dev server (dummy Cloudflare credentials): service-aware placeholder, single-row input, V4 query-string rejection, and a real (upstream-rejected, since the zone id is a dummy value) prefix purge request round-tripping correctly
  • Did not exercise the "confirm empty-path purge" branch end-to-end (blocked by this environment's own safety guard) or run against real Cloudflare credentials

🤖 Generated with Claude Code

The Prefix mode button existed but pressing 실행 always rendered a
"not yet supported" stub. Wire it to /purge/execute: a non-empty
path sends a prefix purge, an empty path asks for confirmation
naming the selected service (per PRODUCT_SPEC V5 and the resolved
ARCHITECTURE decision that typing the name is not required) and
only resends with that confirmation on explicit approval. The path
input switches to a single row in Prefix mode and its placeholder
shows a full image URL, since the intended workflow is pasting a
URL and trimming it from the right into a prefix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@cable8mm
cable8mm merged commit 86bc436 into main Oct 19, 2026
1 check passed
@cable8mm
cable8mm deleted the prefix-purge-mode branch October 19, 2026 03:39
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