Skip to content

Fix the Lens hero CTA: "Review N fixes" pointed at a retired route - #772

Merged
anilmurty merged 3 commits into
mainfrom
fix/lens-review-cta-dead-link
Sep 26, 2026
Merged

anilmurty merged 3 commits into
mainfrom
fix/lens-review-cta-dead-link

Conversation

@anilmurty

Copy link
Copy Markdown
Contributor

Reported from a live Lens (2026-09-25): clicking Review 8 fixes put #/review in the address bar and left the reader on the Dashboard.

Why

#/review is a retired page. Its apply lifecycle moved onto the Optimize detail pages and its summary onto the Dashboard's own band, and primaryKeyFor aliases the hash to dashboard so old bookmarks do not 404. The Dashboard's own CTA was never repointed, so it navigated to an alias of the page it was already on.

This is the shape Critical Rule 24(c) describes: the link existed, the route resolved, and the destination gave the reader nothing new.

Fix

The CTA builds its href from the biggest opportunity (optimizeFindingHref(opps[0].name)), which is the page that can apply the fix and the one the button's own sub-line already names ("starts with the biggest one: Subagent"). With no priced opportunity the hero renders its empty state and never reaches the CTA.

Tests

tests/unit/test_lens_dashboard_states.py gains a case pinning the inverse of the defect per Critical Rule 23: the href must be computed from the top opportunity, and #/review must not appear as a link target anywhere in the file. Unit suite and test_lens_module_parses.py green.

🤖 Generated with Claude Code

"Review N fixes" pointed at #/review. That page was retired when its
apply lifecycle moved onto the Optimize detail pages, and primaryKeyFor
aliases the hash to the Dashboard so old bookmarks do not 404. The
button therefore re-rendered the page the reader was already on: the
address bar changed and nothing else did. Critical Rule 24(c) is about
exactly this, checking that a destination resolves rather than that a
link exists.

The CTA now builds its href from the top opportunity, which is the page
that can apply the fix and the one the sub-line already names. The test
pins the inverse of the defect rather than deleting anything: the href
must be computed, and #/review must not appear as a link target.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Fixes a hero button that pointed at a retired route.

The PR appears safe to merge; no outstanding or new actionable findings remain.

Summary

The PR redirects the Lens hero CTA from the retired review route to a surface for the largest opportunity. It also adds destination tests and, since the previous review, applies the existing Node.js skip marker to the new parametrized tests.

Reviews (3) · Last reviewed commit: "Skip the CTA resolution tests when node ..."

Comment thread tokenjam/ui/index.html Outdated
Comment thread tests/unit/test_lens_dashboard_states.py Outdated
Greptile, both valid.

P1: the fix reintroduced the defect it removed, one analyzer along.
relearn is not in DETAIL_ANALYZER_NAMES, so when a priced relearn
cluster is the biggest contributor the CTA opened #/optimize/relearn,
which renders "no relearn finding in the latest scan" under a button
promising a fix. analyzerSurfaceHref now resolves each analyzer to a
surface that actually renders it: its detail card, the Rules view for
relearn, the Summarize view for summarize, and the ranked Optimize
landing for anything with no surface of its own.

P2: the test pattern-matched the source that builds the href, so it
would have stayed green if the helper or the router later sent readers
back to the Dashboard. It now lifts analyzerSurfaceHref, optimizeFindingHref
and primaryKeyFor out of the page and RESOLVES each analyzer through the
real router, asserting the primary view key is never 'dashboard'.
Parametrised over all eleven detail analyzers plus the three without a
detail card.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment thread tests/unit/test_lens_dashboard_states.py
Greptile, valid: the two new parametrized tests shell out to node
through _resolve, so without it they failed with FileNotFoundError
instead of skipping. The file already carries the _node marker the
other JS tests use; these now use it too. Verified by running the file
with node off PATH: 28 passed, 36 skipped, no errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@anilmurty
anilmurty merged commit be93077 into main Sep 26, 2026
6 checks passed
@anilmurty
anilmurty deleted the fix/lens-review-cta-dead-link branch September 26, 2026 18:15
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