Repository navigation
feat(seer): Add nav snapshot parser and generator from Seer - #131035
Draft
TooGood007 wants to merge 3 commits into
Draft
TooGood007 wants to merge 3 commits into
TooGood007 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
The port itself is solid. I ran it against this branch and got the same 122 entries the description claims, and all 21 tests pass under make test-tools. Two things before this leaves draft:
test_parses_this_checkoutparses the realstatic/tree, andcheck_alias_sourcesraisesSystemExitonceutils/seer/showNewSeer.tsororgHasNewSeerPlan.tschanges. Buttests/toolsonly runs in thedev envworkflow (make test-tools), and that workflow only triggers ontools/**and a few other paths, notstatic/**. Backend shards skip it too (IGNORED_DIRSincalculate-backend-test-shards.py). So a frontend PR that changesshowNewSeer.ts, or reshapes a nav config the live test depends on, merges green. Then the next unrelated PR that touchestools/**fails on it. I reproduced this by adding a non-comment line toshowNewSeer.ts: the test fails with the alias-hashSystemExit. Either add the parsed source paths to thedev envworkflow'spaths:(secondary nav sections, the settings nav configs,utils/seer/,router/routes.tsx,issueList/taxonomies.tsx,gsApp/overrides/useBillingNavigationConfig.tsx), or hold the live-checkout test until the follow-up adds a--checkjob that runs onstatic/changes.- Not something this PR made worse, since it matches Seer's current snapshot, but you should know about it before the snapshot starts gating anything: the Insights section (Frontend/Backend/Mobile/Agents/MCP) and the Seer section produce no entries, and nothing reports it. In
_secondary_nav_entries,baseUrlis kept raw, so${DOMAIN_VIEW_BASE_URL}never resolves and_org_relative_pathdrops the link. The Insights labels are also{FRONTEND_SIDEBAR_LABEL}-style constants, not{t('...')}, solabelsis empty. Seer's links use plain variables (to={automationsPath}). The only guard is "zero entries total". A cheap one: fail when a*SecondaryNavigation.tsxwithSecondaryNavigation.Links produces zero entries, so silent drops show up in--checkinstead of as missing Seer links.
joseph-sentry
approved these changes
Nov 13, 2026
| assert LOGS.to_dict() == {"crumbs": "Explore → Logs", "path": "/explore/logs/"} | ||
|
|
||
|
|
||
| def test_parses_this_checkout() -> None: |
Contributor
There was a problem hiding this comment.
This test parses the real static/ tree, but tests/tools only runs in the dev env workflow, which doesn't trigger on static/**. So a frontend PR that changes showNewSeer.ts (alias hash) or a nav config merges green, and the next unrelated tools/ PR fails here.
Possible fix: skip this test until the follow-up --check job that runs on static/ changes lands, or add the parsed frontend paths to the dev env workflow's paths:.
This comment was generated with Claude Code.
This branch has not been deployed
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.
Seer links chat answers to Sentry pages using a snapshot of the nav, which Seer
builds by downloading this repo's frontend source and parsing it. The snapshot
only updates when someone reruns that in Seer, so a renamed or moved page leaves
Seer linking to the old route.
Port Seer's parser into tools/seer_nav so the snapshot can be built from this
checkout. It reads the secondary nav, settings nav configs (including gsApp
billing), issue taxonomy and route tree, and records the conditions each page is
shown under (feature flags, deployment, org settings) as data.
python -m tools.seer_nav.generate_snapshotwrites the snapshot only when itspages change;
--checkwrites nothing and exits 1 with the command to update it.No snapshot is committed yet and nothing runs it. That comes in follow-up PRs
along with the RPC Seer will read it from. On the current frontend it produces
the same 122 pages as Seer's committed snapshot.