π Description
src/app/anchors/[id]/page.tsx and src/app/settlements/[id]/page.tsx both render a Breadcrumb (src/components/Breadcrumb.tsx) with a link back to the parent list, immediately above the AnchorDetail/SettlementDetail component. However, AnchorDetail (src/components/AnchorDetail.tsx) and SettlementDetail (src/components/SettlementDetail.tsx) each still render their own <Link href="/anchors">β Back to anchors</Link> / <Link href="/settlements">β Back to settlements</Link> at the top of their own markup β a leftover from before Breadcrumb was added. The result is two redundant "go back" affordances stacked on top of each other on every detail page.
π§© Requirements and context
- Remove the standalone "β Back to X"
Link from AnchorDetail.tsx and SettlementDetail.tsx, now that Breadcrumb (rendered by the parent page) already provides that navigation.
- Confirm neither component is used anywhere else without a
Breadcrumb already present (e.g. check for other call sites before removing).
- No change to either component's data-loading, deactivate/execute/cancel, or
ConfirmDialog behavior.
π οΈ Suggested execution
- Remove the leading
<Link> block from src/components/AnchorDetail.tsx and src/components/SettlementDetail.tsx.
- Update
src/components/AnchorDetail.test.tsx and src/components/SettlementDetail.test.tsx to drop any assertions on the removed link (and confirm the surrounding tests still pass).
- Spot-check
src/app/anchors/[id]/loading.tsx and src/app/settlements/[id]/loading.tsx, which render their own back-link during the loading state and are unaffected by this change (they don't yet render a Breadcrumb).
β
Acceptance criteria
π Security notes
No new attack surface; a UI de-duplication cleanup.
π Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
π Description
src/app/anchors/[id]/page.tsxandsrc/app/settlements/[id]/page.tsxboth render aBreadcrumb(src/components/Breadcrumb.tsx) with a link back to the parent list, immediately above theAnchorDetail/SettlementDetailcomponent. However,AnchorDetail(src/components/AnchorDetail.tsx) andSettlementDetail(src/components/SettlementDetail.tsx) each still render their own<Link href="/anchors">β Back to anchors</Link>/<Link href="/settlements">β Back to settlements</Link>at the top of their own markup β a leftover from beforeBreadcrumbwas added. The result is two redundant "go back" affordances stacked on top of each other on every detail page.π§© Requirements and context
LinkfromAnchorDetail.tsxandSettlementDetail.tsx, now thatBreadcrumb(rendered by the parent page) already provides that navigation.Breadcrumbalready present (e.g. check for other call sites before removing).ConfirmDialogbehavior.π οΈ Suggested execution
<Link>block fromsrc/components/AnchorDetail.tsxandsrc/components/SettlementDetail.tsx.src/components/AnchorDetail.test.tsxandsrc/components/SettlementDetail.test.tsxto drop any assertions on the removed link (and confirm the surrounding tests still pass).src/app/anchors/[id]/loading.tsxandsrc/app/settlements/[id]/loading.tsx, which render their own back-link during the loading state and are unaffected by this change (they don't yet render aBreadcrumb).β Acceptance criteria
π Security notes
No new attack surface; a UI de-duplication cleanup.
π Guidelines