Skip to content

[P1][bug] Schema refresh actions don't refresh the visible tree correctly (FR-4.1.5) #289

Closed

Description

@EVWorth

Context

DESIGN_REQUIREMENTS §FR-4.1.5: "Refresh individual nodes, subtrees, or entire tree; Ctrl+R shortcut". ARCHITECTURE §3.3 describes an event-driven invalidation.

Problem

Database-level Refresh reloads only tables; views/routines/triggers remain stale. Full refresh (toolbar/F5) clears useSchemaCache but SchemaTree uses separate local state and does not observe it, so the visible tree remains stale. Post-DDL refreshes similarly fail to update the autocomplete cache.

Files

  • src/components/schema/SchemaTree.tsx:215

Repro

  1. In another session, CREATE TABLE foo (id int); on the connected DB.
  2. App-side, right-click app → Refresh.
  3. foo is missing from the tree.

Expected

Folder refresh updates one folder; database refresh updates every folder under that database; full refresh updates both tree and autocomplete cache.

Proposed fix

Scope L. One schema store with connection/object-scoped invalidation; route full-tree, database, folder, and post-DDL refresh through it. Align with the cross-cutting cache design from batch 6.

Acceptance

All four refresh paths update the visible tree and autocomplete cache coherently.

Needs human verify

No.

Activity

  1. added
    audit
    severity/p1
    kind/bug
    kind/doc-drift
    area/schema
    on Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/schemaauditkind/bugkind/doc-driftseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions