fix: remove duplicate back links on detail pages now covered by Breadcrumb (#238) - #424
Open
Ayinkx wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #238.
Both detail pages (
src/app/anchors/[id]/page.tsxandsrc/app/settlements/[id]/page.tsx) already render aBreadcrumb(with a link back to the parent list) immediately above the detail component.AnchorDetailandSettlementDetailstill rendered their own standalone← Back to anchors/← Back to settlementslink at the top of their markup — a leftover from beforeBreadcrumbwas added — resulting in two stacked "go back" affordances on every detail page.What changed
<Link href="/anchors">← Back to anchors</Link>block fromsrc/components/AnchorDetail.tsx.<Link href="/settlements">← Back to settlements</Link>block fromsrc/components/SettlementDetail.tsx.AnchorDetail.test.tsxandSettlementDetail.test.tsx.ConfirmDialogbehavior.Call-site check
Per the issue's requirement, I confirmed neither component is used anywhere else without a
Breadcrumb:AnchorDetail— used only bysrc/app/anchors/[id]/page.tsx(rendersBreadcrumb).SettlementDetail— used only bysrc/app/settlements/[id]/page.tsx(rendersBreadcrumb).A grep across
src/found no other call sites. Thesrc/app/anchors/[id]/loading.tsxandsrc/app/settlements/[id]/loading.tsxfiles render their own back-link during the loading state and don't render aBreadcrumb, so they are intentionally untouched (as the issue notes).Note on the 404 branch
The not-found message inside each component still renders its inline
Back to anchors/Back to settlementslink (inside the error card). That link is context-specific ("this record was not found") and is not the redundant top-of-page link described in the issue, so it was kept.Acceptance criteria
Test evidence
npx vitest run src/components/AnchorDetail.test.tsx src/components/SettlementDetail.test.tsx:The single failure (
disables Execute and Cancel while settlement action is pendinginSettlementDetail.test.tsx) is a pre-existing, timing-sensitive test that also fails on cleanmain(verified viagit stash); it is unrelated to this change.Full-suite comparison against clean
main(both run locally):main: 10 test files failed, 48 tests failed / 577 passedThe remaining failures (e.g.
src/lib/wallet.test.tsSecurityErrorlocalStorage spying) exist onmainand are untouched by this PR.npx tsc --noEmit: 15 pre-existing errors, none in the changed files (identical count onmain).npx eslinton the four changed files: 3 pre-existing@typescript-eslint/no-explicit-anyerrors on untouched lines (identical onmain); no new warnings/errors introduced.Checklist
[Unreleased](this PR changes user-facing behavior: removes the redundant link).