Skip to content

refactor: rename deployment route param from :id to :suffix - #78

Merged
codxbrexx merged 1 commit into
metacall:masterfrom
KanishJebaMathewM:refactor/use-deployment-suffix-route
Nov 20, 2026
Merged

codxbrexx merged 1 commit into
metacall:masterfrom
KanishJebaMathewM:refactor/use-deployment-suffix-route

Conversation

@KanishJebaMathewM

@KanishJebaMathewM KanishJebaMathewM commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Removes the semantic mismatch between the route parameter name (:id) and the domain concept it carries (a deployment suffix). The URL shape is unchanged — /deployments/:value and /deployments/:value/logs still work the same way, so existing bookmarks and navigation links are unaffected.

What changed:

  • AppRouter.tsx — both deployment routes renamed from :id to :suffix.
  • DeploymentFunctionPage.tsx — const { id: suffix } = useParams() simplified to const { suffix } = useParams(). The aliasing was only needed because the param was named :id; it's now a direct destructure.
  • LogsViewerPage.tsx — same alias removal as above.
  • deployment_function_page_test.tsx — existing toast tests updated to register the route under :suffix; new describe block added asserting that api.inspectByName receives the correct slug when the route uses :suffix (not :id).
  • appRouter_test.tsx (new file) — two focused tests: one confirms suffix is populated correctly from the URL segment, one confirms params.id is undefined on the same route, ruling out any residual :id reference.

Type of Change

  • refactor: Code refactor (no functional changes, no API changes)
  • test: Adding or updating tests

Checklist

  • My code follows the coding standards of this project.
  • I have added tests that prove my fix is effective or my feature works.
  • New and existing tests pass locally (npm run unit and npm run test).
  • My changes generate no new lint warnings or errors (npm run lint).
  • My PR title follows Conventional Commits.

@codxbrexx

Copy link
Copy Markdown
Collaborator

good work! Looks good to me. merging it now.

@codxbrexx
codxbrexx merged commit 2a07939 into metacall:master Nov 20, 2026
1 check 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