Skip to content

Hide system subtypes and seeded agent queries from the sidebar; Types and Views rename (#3851 #3850 #3839) - #3852

Merged
mstomar125 merged 2 commits into
mainfrom
issue-3851-hide-system-types
Oct 20, 2026
Merged

mstomar125 merged 2 commits into
mainfrom
issue-3851-hide-system-types

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

What changed

Tests

  • vitest: schemas.test.ts, saved-queries.test.ts, navigation-sidebar-saved-queries.test.ts, query-node-viewer-ask.test.ts (31 passed). New cases: extension subtype hidden (direct and via a custom parent), plain custom type shown, custom type extending task shown, hidden-base risk documented; seeded queries excluded while a user query on the same type is listed (store and sidebar); a parity test keeps the TS id set equal to the Rust CORE_QUERY_IDS.
  • eslint on touched files clean; svelte-check 0 errors; pre-push lint gate passed.
  • No Rust changed, so seeded query names/ids/run_query behavior are untouched (existing core_queries_test.rs unchanged).

Closes #3851
Closes #3850
Closes #3839

🤖 Generated with Claude Code

@mstomar125 mstomar125 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Type: Initial Review (no prior reviews)

Verdict: APPROVE WITH NITS

No blocking findings. The three issues are implemented as specified; the nits are non-blocking.

Requirements check

#3851 (hide by what it extends) - met

  • packages/desktop-app/src/lib/stores/schemas.svelte.ts:65-103: customSchemas now excludes a schema whose nearestCoreType(id) is a core type outside SIDENAV_CORE_TYPES. No new schema flag. The comment explains the rule, the reason, the known risk (a user type extending database-settings/collection/text is hidden too) and how to bring a type back.
  • nearestCoreType (core-node-types.ts:109, via typeChain): a schema with no extends has a chain of only itself, so it returns undefined and is shown. A chain through a user type (leaf -> mid -> database-settings) resolves via the store's resolver and is hidden. A dangling or not-yet-loaded parent also returns undefined and the schema is shown, which is the safe direction. The resolver reads schemasStore.schemas, so this stays reactive.
  • Tests (src/tests/stores/schemas.test.ts): hidden direct, hidden through a user type, shown with no extends, shown for a user type extending a browsable core type (direct and via a user parent), and the known-risk case.
  • Regression sweep for customSchemas: the only consumer is navigation-sidebar.svelte:144,600-611. The other hits in schema-plugin-loader.ts are local variables that filter !isCore on their own. No type picker, count, onboarding or search reads it, so plugin registration and "create node of type" flows are unaffected. The change is a sidebar-list change only.

#3850 (seeded queries hidden, still real nodes) - met

  • src/lib/stores/saved-queries.svelte.ts:23-52,109: the 10 ids are filtered out of the sidebar list only. The nodes, ids and names are untouched, so run_query "Ready tasks" and attached_to skills keep working.
  • Evidence: I compared the 10 UUIDs to CORE_QUERY_IDS in packages/core/src/services/query_service/core_queries.rs:26-60 by hand and they are identical. A new test parses the Rust file and asserts set equality, which guards against drift.
  • User queries on the same type still show (store test and sidebar test). savedQueriesData.has() is used by the sync listeners (tauri-sync-listener.ts:462, browser-sync-service.ts:277,297) only to trigger refreshes. Hidden seeded queries not triggering a refresh is harmless.

#3839 (strings) - met

  • query-node-viewer.svelte:669: the type page button reads Ask about {schemaNode.content} type.... The saved-query button at line 666 stays Ask.
  • navigation-sidebar.svelte: label, both aria-labels (Collapse/Expand), the collapsed-state title and the comments are renamed.
  • Whole-repo grep for "Node Types": the only remaining hits are scripts/check-node-types-doc.test.ts:25 (a fixture doc title, unrelated) and packages/core/src/models/core_schemas.rs:1975 (a Rust comment about a doc heading). No stale UI strings in e2e, i18n, aria-labels or docs. Remaining Ask labels are bound-chat-button.test.ts (generic component test) and agent_loop.rs (unrelated "Ask" type-name test).
  • Tests: query-node-viewer-ask.test.ts updated; the negative assertion is loosened to /^Ask/, which is fine.

Findings

  1. Non-blocking (nit) - packages/desktop-app/src/tests/stores/saved-queries.test.ts (the CORE_QUERY_IDS parity test): it parses Rust source with a regex and a fixed toHaveLength(10). It works and does catch drift, but it breaks, with a message that may confuse, if the Rust list is reformatted or a query is added. Consider a clearer failure message ("update SEEDED_AGENT_QUERY_IDS"), or a note near the Rust const pointing at the TS set.
  2. Non-blocking (nit) - same test file, [...SEEDED_AGENT_QUERY_IDS].slice(3) relies on Set insertion order to pick "Ready tasks"/"Needs shaping"-like ids. Use the named ids (as the sidebar test does) so the test does not depend on list order.
  3. Non-blocking (design note, accepted risk) - schemas.svelte.ts:65-67: a user-made type extending text/collection/note-like non-browsable core types disappears from the sidebar. The PR documents this as decided, and it is covered by a test; I only flag that the hidden-type recovery path (add base to SIDENAV_CORE_TYPES) also lists the core base type in builtInSchemas, which the comment states. No action needed.
  4. Non-blocking (nit) - navigation-sidebar.svelte: internal names (nodeTypesExpanded, setNodeTypesExpanded, layout store key) keep the old wording. Keeping the persisted key avoids resetting users' saved state, so this is sensible; just noting it is intentional.

Verification run

bun x vitest run on schemas.test.ts, saved-queries.test.ts, navigation-sidebar-saved-queries.test.ts, query-node-viewer-ask.test.ts: 4 files, 31 tests, all passed. No Rust builds were run.

Security/performance: no concerns (the filter is O(chain length) per schema, only on the sidebar derive).

mstomar125 and others added 2 commits October 20, 2026 12:46
…e Types and Views

- schemasStore.customSchemas drops a schema whose extends chain reaches a
  core type outside SIDENAV_CORE_TYPES
- savedQueriesData skips the ten core-seeded query ids (kept as query nodes)
- type-page chat button reads 'Ask about <type> type...'
- side-nav parent renamed to 'Types and Views'

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n saved-queries test

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mstomar125
mstomar125 force-pushed the issue-3851-hide-system-types branch from 286f904 to 1168dcc Compare October 20, 2026 10:46
@mstomar125
mstomar125 merged commit c23494c into main Oct 20, 2026
@mstomar125
mstomar125 deleted the issue-3851-hide-system-types branch October 20, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant