ENG-2213 Settings catalog: address every setting by key and location - #1379
Open
trangdoan982 wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR size/scope checkThis PR is over our review-size guideline.
Please split this into smaller PRs unless there is a clear reason the changes need to land together. If keeping it as one PR, please add a brief justification covering:
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
2 tasks
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
August 31, 2026 23:08
bc865f3 to
81f750e
Compare
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 3, 2026 20:30
73ad70b to
ba602f6
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 3, 2026 20:30
81f750e to
fd2b364
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 4, 2026 21:57
fd2b364 to
8f6c3bd
Compare
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 4, 2026 21:57
ba602f6 to
efae0ef
Compare
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 4, 2026 22:46
efae0ef to
2fae9dd
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 4, 2026 22:46
8f6c3bd to
0a82e0e
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 5, 2026 22:55
0a82e0e to
2867339
Compare
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 5, 2026 22:55
2fae9dd to
7b3b18d
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 5, 2026 22:59
2867339 to
369c7f8
Compare
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 5, 2026 23:12
424f4f4 to
f421048
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 5, 2026 23:12
369c7f8 to
c3c5884
Compare
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 7, 2026 22:23
f421048 to
6e2b2a9
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 7, 2026 22:23
c3c5884 to
4c1e173
Compare
Records what every setting row is called and where it lives, so a later change can find a setting without knowing which tab it is on. Nothing in the codebase held this. `zodSchema.ts` is storage shape — no labels, no descriptions, no locations — and `settingKeys.ts` holds block keys that diverge from what a row renders: `GLOBAL_KEYS.trigger` renders as "Graph-wide default", `PERSONAL_KEYS.personalNodeMenuTrigger` as "Personal override". Nor can it be collected at runtime: `Tabs` uses `renderActiveTabPanelOnly`, so inactive panels are out of the DOM and rows cannot self-register. So the label, group, description, doc link and location are authored, one entry per row. Everything else is derived rather than restated. Entries are keyed by `GROUP.member`, addresses are built by resolving that id against the `settingKeys.ts` constants, and the catalog is declared `satisfies Record<RowKeyId, AuthoredSetting>`. A key added to `settingKeys.ts` is then a compile error until it is either given an entry or listed in `NonRowKeyId` with a reason, so a new setting cannot silently go missing. The remaining gap is the reverse direction: nothing checks that a row rendering `settingKeys` was classified as a row rather than exempted. An entry's `path` is the only field a relocation has to touch. Node-type settings give `path` as a function of the node uid, so one entry expands to one result per node type and adding a node type never edits this file. Six rows rendered without an anchor, so they had no stable address; each now passes the key constants already in scope at its call site. `SETTINGS_TAB_META` becomes the single source for tab labels, because a renamed tab would otherwise drift away from the locations recorded here. `SettingItemRow` falls back to the catalog for a description when the prop is omitted, so ENG-2187 can migrate call sites by deleting props rather than by copying text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The key was exempted as "persisted UI state and canvas-written values", but CanvasShortcutSettings renders it as a visible editor under Features > Canvas, so a real setting was missing from the index: searching "canvas shortcut" only found the discourse tool shortcut. Authored as one row rather than one per node type, because the overrides share a single stored value; the anchor goes on the grid so a jump lands on it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The catalog is what makes search navigable, and its invariants fail quietly: a duplicate id breaks React keys, a nested setting that drops its parent segment collides with a same-named top-level key, and an entry pointing at a tab that no longer exists sends the user nowhere. Also pins the two rules the export move introduced: settings living outside the Settings dialog stay out of the index, and stay authored here anyway so their rows keep reading one description. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…sTabId Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Index and Format now sit under Identity and Specification under Legacy, so the breadcrumbs search shows match the page. Format's description loses the DEPRECATED note along with the row. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
trangdoan982
force-pushed
the
eng-2183-build-the-new-setting-item-row-component
branch
from
September 8, 2026 01:02
6e2b2a9 to
a73c878
Compare
trangdoan982
force-pushed
the
eng-2213-settings-catalog-address-every-setting-by-key-and-location
branch
from
September 8, 2026 01:02
4c1e173 to
1ba0ab8
Compare
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.
Reviewer brief
Result: Every setting row now has a stable address and a recorded location. Nothing consumes this yet — ENG-2184 (ENG-2184 Add search to the settings panel #1378, stacked on top) is the first reader. It is split out because it is ~590 lines that are mostly declarative data, and it dominated that diff.
Review focus — why this is authored rather than derived. Three constraints, worth checking before reading
settingsCatalog.tsas a pile of literals:TabsusesrenderActiveTabPanelOnly, so inactive panels are out of the DOM and rows cannot self-register.zodSchema.tsis storage shape — no labels, no descriptions, no locations. Location is a pure UI fact with no runtime source.GLOBAL_KEYS.triggerrenders as "Graph-wide default",PERSONAL_KEYS.personalNodeMenuTriggeras "Personal override", andDISCOURSE_NODE_KEYSvalues are"canvasSettings","key-image".Review focus — the key list is not restated, and coverage is a type error. Entries are keyed by
GROUP.member; addresses are built by resolving that id against thesettingKeys.tsconstants; the object is declaredsatisfies Record<RowKeyId, AuthoredSetting>, whereRowKeyIdis every key insettingKeys.tsminus an explicitNonRowKeyIdlist (22 containers, admin-only flags and nested sub-controls, each with its reason). Adding a key tosettingKeys.tsfails to compile until it is entered or exempted.Verified by mutation: deleting
GLOBAL_KEYS.canvasPageFormatfrom the catalog, and adding a new key tosettingKeys.ts, each failtscwith TS1360.Risk or follow-up:
settingKeyswas classified as a row rather than exempted, so exempting a key that is really a visible row would drop it from search silently. TheNonRowKeyIdlist is the part most worth a careful read.LeftSidebarPersonalSettings.tsxpasssettingKeys={[]}— per-section instances with no stable address. Pre-existing; exempted asLEFT_SIDEBAR_KEYS.childrenand needs an addressing scheme rather than a one-liner.SettingItemRow's catalog description fallback has no call site yet. It exists so ENG-2187 can migrate rows by deleting props instead of copying text.Verification
pnpm ci:validate(check-types + 142 unit tests) and eslint on the changed files — 0 errors, no new warnings on added lines.Export/Link type,Query/Hide query metadata,canvasSettings/color,suggestiveRules/embeddingRef,template. These have to matchsettingAnchorexactly or ENG-2184's jump lands nowhere.Grammar › Nodes › Claim › RecognitionandGrammar › Nodes › Evidence › Recognition, with unique ids.Scope check
$scope-checkagainst the ENG ticket and final diff.Done When:SettingItemRowfallback. ENG-2184 originally scoped description search out; it was requested during implementation. Storing the text once and letting the row read it back is what stops the row and search drifting apart.PreferencesGeneralraw string →PERSONAL_KEYS.reifiedRelationTriples, for consistency with every other row's addressing.SETTINGS_TAB_META, withSettings.tsxtitling its tabs from it. Locations are recorded per tab, so a renamed tab would otherwise drift away from the catalog.Local delegated full review