Skip to content

refactor(routes): retire token counter and pipe - #971

Open
trac3r00 wants to merge 4 commits into
release/product-value-20260912-01from
release/product-value-20260912-02
Open

trac3r00 wants to merge 4 commits into
release/product-value-20260912-01from
release/product-value-20260912-02

Conversation

@trac3r00

@trac3r00 trac3r00 commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

refactor(routes): retire token counter and pipe. This is logical change 2/11 in the dependency-ordered product-audit release stack.

Refs #969

What changed

  • refactor(routes): retire token counter and pipe
  • Exact source commit: 5aa335cca3e2ecb40cf450d8cc9a46ed04ef8b68; validated tree: 70ea8cffb37fb493ba30ccff8085c24c85993278.
  • Depends on the preceding release-stack PR. Retarget to main only after its dependency is merged and deployed.

Why

Remove the retired token counter and pipe routes without leaving broken registry entries, fonts, or bookmarks.

Verification

  • bun run build passed on this exact candidate tree.
  • npm test -- --maxWorkers=2 passed on this exact candidate tree.
  • Affected behavior manually exercised as described below.
  • Latest GitHub Build, Unit Tests (Vitest), and E2E Tests (Playwright) must all pass before merge.
Tests  711 passed (711)
CANDIDATE_BUILD_UNIT_GREEN
Committed tree equals validated tree: 70ea8cffb37fb493ba30ccff8085c24c85993278

Four retired URL/slash/query fixtures returned the correct 301 targets; no retired cards or sitemap entries; 45 public tools and 3 dev games.

Final combined tree additionally passed 801 unit tests and all 293 Playwright tests with retries disabled, plus all 48 primary tool workflows at desktop and mobile. The exploratory Color Converter exact-HEX boundary remains a documented pre-existing defect; its runtime is unchanged by this stack.

Risk & rollback

  • Risk: Dependent commits require earlier stack changes; merge in order.
  • Rollback: revert this PR through a new PR; do not revert dependencies beneath already-merged dependents.
  • Release: require an approving review and latest-SHA CI. Respect the 15-minute soak between deploy-affecting merges and verify the production deployment before continuing.

Summary by cubic

Retires the token counter and pipe routes (Refs #969). /token-counter and /pipe now 301 to /prompt-template-builder and /json-formatter instead of rendering their pages, so existing bookmarks and query strings keep working; the production catalog drops from 47 to 45 tools.

Refactors

  • Removes both route handlers, registry entries, translations, home icons, and font subset references.
  • Updates docs, ad-path checks, and unit tests to match the retired routes.
  • E2E tests navigate the retired paths in-browser with a query string and assert the 301, query preservation on the Location header and landed URL, and a control unique to the destination.

Rollout

  • This is change 2/11 in the release stack; merge after the preceding PR and retarget to main only after it is deployed.
  • To roll back, revert this PR via a new PR rather than reverting dependencies beneath merged dependents.

Written for commit 6135db1. Summary will update on new commits.

Review in cubic

Retain query-preserving redirects and keep registry, catalogs, handlers, font subset and route tests aligned.

Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 36 files

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread tests/e2e/generators-utils-ui.spec.js Outdated
Navigate to /token-counter and /pipe themselves instead of loading the
destination directly, assert the browser was redirected from the retired
path, and check a control unique to each landing tool. The 301 and
Location checks stay as they were.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Shadow auto-approve: would not auto-approve because issues were found.

Re-trigger cubic

Comment thread tests/e2e/generators-utils-ui.spec.js Outdated
#format-btn also exists on JSON Schema Studio; #json-empty-state is unique
to the formatter. Assert redirectedFrom() through optional chaining so a
missing redirect fails as an assertion instead of a TypeError.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Shadow auto-approve: would not auto-approve because issues were found.
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread tests/e2e/page-sweep-2026-05-11.spec.js Outdated
Parse redirectedFrom() only after asserting it exists, compare the
pathname exactly instead of suffix-matching the full URL, and drive
/pipe and /token-counter with a query string so the redirect's query
preservation is asserted on both the Location header and the landed URL.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would require human review. Retires token-counter and pipe: handlers, registry, i18n, docs, and tooling references removed. The claimed 301 redirects preserving bookmarks/query strings aren't visible in the provided diff (routing diffs omitted), so the public URL change needs human sign-off.

Re-trigger cubic

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