Skip to content

fix(dashboard): point refund and return reason row links at their edit routes - #16742

Open
Minhal128 wants to merge 1 commit into
medusajs:developfrom
Minhal128:fix/reason-list-row-href
Open

fix(dashboard): point refund and return reason row links at their edit routes#16742
Minhal128 wants to merge 1 commit into
medusajs:developfrom
Minhal128:fix/reason-list-row-href

Conversation

@Minhal128

Copy link
Copy Markdown

Summary

What — The configurable refund reason and return reason list tables link each row to /settings/refund-reasons/:id and /settings/return-reasons/:id. Both now link to that entity's edit route instead.

Why — Neither :id route has an element. In get-route.map.tsx both entries are only a container for an edit child:

{
  path: ":id",
  children: [
    { path: "edit", lazy: () => import("../../routes/refund-reasons/refund-reason-edit") },
  ],
},

So /settings/refund-reasons/:id matches, renders nothing, and the row click is a dead navigation — the URL changes and the list stays as it was. These are the only two :id routes in the settings tree without an element, which is why the rest of the configurable tables are unaffected.

This is the same class of bug as #16625 (shipping profile rows pointing at an unregistered path), found by checking the other getRowHref values against the route map rather than the reported one.

HowgetRowHref in both table adapters now returns .../${row.id}/edit. That is the destination the row actions menu already uses:

// refund-reason-list-table-actions.tsx
navigate(`/settings/refund-reasons/${refundReason.id}/edit`)

so a row click and the row's own “Edit” action now agree. The legacy tables never made rows clickable, so nothing changes outside the configurable tables used when view_configurations is enabled.

Testing — With view_configurations enabled, go to Settings → Refund Reasons and click a row: before, the URL changed and nothing rendered; now the edit drawer opens, matching the row actions menu. Same for Settings → Return Reasons.

I did not run the dashboard typecheck locally — the change is the contents of a template literal, so its type is unchanged.


Notes

An alternative reading is that these rows were not meant to be clickable at all, matching the legacy tables. I went with the edit route because it keeps the row navigation the configurable table opted into and makes it agree with the row actions. Happy to switch to dropping getRowHref if you prefer.

…t routes

The configurable refund and return reason list tables set `getRowHref` to
`/settings/{refund,return}-reasons/:id`. Neither route has an element: in
the route map both `:id` entries only carry an `edit` child, so the URL
matches but renders nothing and the row click is a dead navigation.

Both domains reach editing through `/settings/{refund,return}-reasons/:id/edit`,
which is what the row actions menu already navigates to, so the row links now
point there too. The legacy tables never made rows clickable, so this only
affects the configurable tables used when `view_configurations` is enabled.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Minhal128
Minhal128 requested a review from a team as a code owner September 6, 2026 18:04
Copilot AI lite review requested due to automatic review settings September 6, 2026 18:04
@changeset-bot

changeset-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9231a73

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 83 packages
Name Type
@medusajs/dashboard Patch
@medusajs/draft-order Patch
@medusajs/loyalty-plugin Patch
@medusajs/admin-bundler Patch
@medusajs/medusa Patch
@medusajs/test-utils Patch
@medusajs/medusa-oas-cli Patch
integration-tests-http Patch
@medusajs/analytics Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/caching Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/rbac Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/search Patch
@medusajs/settings Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/translation Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/search-postgres Patch
@medusajs/oas-github-ci Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/analytics-local Patch
@medusajs/analytics-posthog Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/auth-oidc Patch
@medusajs/caching-redis Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/core-flows Patch
@medusajs/framework Patch
@medusajs/instantsearch-adapter Patch
@medusajs/js-sdk Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/query Patch
@medusajs/types Patch
@medusajs/utils Patch
@medusajs/workflows-sdk Patch
create-medusa-app Patch
@medusajs/http-types-generator Patch
@medusajs/cli Patch
@medusajs/deps Patch
@medusajs/eslint-plugin Patch
@medusajs/telemetry Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
@medusajs/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@medusa-os-bot

medusa-os-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thanks for the contribution! Initial automated review looks good.

The PR fixes a dead-navigation bug in the refund-reason and return-reason configurable list tables. When view_configurations is enabled, clicking a row navigated to /:id, which has no route element — only its edit child is mapped to a lazy-loaded component in get-route.map.tsx. The fix appends /edit to getRowHref in both adapters, aligning row clicks with the existing action-menu navigation (which already used /:id/edit). The route map was verified: both :id nodes carry no element, confirming the dead-navigation bug. The changeset is included with the correct patch bump type and fix(dashboard): ... message format. No tests are required for this trivial one-line navigation fix.

Triggered by: new PR opened

@Minhal128 Minhal128 closed this Sep 7, 2026
@Minhal128 Minhal128 reopened this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants