Skip to content

Add Schema-view vertex type hiding - #1931

Open
danielvanza wants to merge 4 commits into
aws:mainfrom
danielvanza:add-schema-view-type-hiding
Open

danielvanza wants to merge 4 commits into
aws:mainfrom
danielvanza:add-schema-view-type-hiding

Conversation

@danielvanza

@danielvanza danielvanza commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add per-connection, persisted hidden vertex types and eye toggles in the Schema view's Nodes styling tab so noisy generic labels can be excluded from the schema graph.
  • Hiding a type removes its schema edges as well. Hidden types remain listed so they can be restored, and Graph view filtering and styling remain independent.
  • Keep the toggle in a Schema-view-only wrapper around the shared style row, opted into only by the Schema sidebar.
  • Prefer a specific label over Gremlin's generic vertex label when choosing the primary vertex type, so the generic label does not override display names and styling.
  • Sync with current main (b864b5d2), resolve the style-row conflict, and adapt hidden-type storage and tests to the renamed connection APIs. Existing persisted map keys retain their shape.

Test plan

  • pnpm checks (types, lint, format) passes on the updated branch.
  • LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 pnpm test passes: 253 files, 3,354 tests. The explicit locale makes the host match the test suite's expected en-US number formatting.
  • Hidden-type, schema-node/edge filtering, sidebar wiring, main-Graph toggle exclusion, and primary-label regressions pass as part of the full suite.
  • Repeat manual UI verification after syncing with main.

Earlier manual verification before this update covered toggling a type off and back on, removing/restoring its schema connections, and persisting hidden state per connection across reloads. Manual UI verification was not rerun during this merge update.

createVertex() used to take types[0] as the primary type driving styling
and naming. Gremlin/TinkerPop's default base label, "vertex", commonly
appears first alongside a more specific label (e.g. ["vertex",
"sqsqueue"]), which meant multi-labeled nodes were styled and named after
the meaningless generic label instead of their specific one. Skip the
generic label (case-insensitively) when a more specific label is present,
falling back to it only when it's the sole label.
The Schema view rendered every discovered vertex type with no way to
exclude noisy ones, e.g. a database's own generic base label showing up
as a node type on every schema graph. Add a per-connection hidden-types
store (mirroring the existing schema atom) and an eye toggle on each row
of the Styles panel's Nodes tab when opened from the Schema view; hiding
a type also drops its schema-graph edges since they lose an endpoint.
Hidden types stay listed, dimmed, so they can be restored, and the hidden
set is scoped to the Schema view only — the main Graph view, canvas
filtering, and discovery are untouched.

The Styles panel is now shared between the Graph and Schema views, so the
toggle is gated behind a showVertexVisibilityToggle prop passed only from
the Schema view's sidebar.
VertexStyleRow is also rendered by the main Graph view's Styles panel,
so a showVisibilityToggle prop and an unconditional useHiddenSchemaTypes()
subscription inside it coupled the shared row to a Schema-view-only
feature. Wrap it from the outside instead (SchemaVertexStyleRow in
VertexStyles.tsx), leaving VertexStyleRow itself untouched.

Also tighten two new tests to assert full expected values with
toStrictEqual instead of toContain/toEqual, per docs/agents/testing.md.
@kmcginnes

Copy link
Copy Markdown
Collaborator

Hi @danielvanza, thanks for this one as well. Hiding a database's generic base label from the Schema view solves a real annoyance, and I like that you kept the hidden set scoped to the Schema view instead of letting it leak into the Graph view.

Same caveat as on #1930: getting back around to community PRs is slow going right now, so this may sit a while.

@danielvanza

Copy link
Copy Markdown
Contributor Author

Updated in 87677b3: merged current main and resolved the merge conflict, keeping schema-only visibility toggles while adapting hidden-type storage and tests to the renamed connection APIs. pnpm checks passes. LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 pnpm test passes all 3,354 tests. The locale flags make the host match the test suite’s expected en-US formatting. The update is pushed and ready for another look.

This branch has not been deployed

No deployments
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.

3 participants