Skip to content

fix: show dropdown chevron buttons on first table open#482

Open
datlechin wants to merge 2 commits intomainfrom
fix/dropdown-chevron-first-open
Open

fix: show dropdown chevron buttons on first table open#482
datlechin wants to merge 2 commits intomainfrom
fix/dropdown-chevron-first-open

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Move synchronous ENUM/SET value parsing from Phase 2 (200ms deferred) to Phase 1, so dropdown chevron buttons appear immediately on first table open
  • Phase 2 now only adds async-only enum values (PostgreSQL catalog types, SQLite CHECK constraints) and skips unnecessary metadataVersion bumps when no new values are found

Root Cause

ENUM/SET column values were resolved in Phase 2b (200ms+ deferred async task), but the grid renders after Phase 1 when columnEnumValues was still empty. FK chevron-right buttons worked because FK data was already parsed in parseSchemaMetadata and applied in Phase 1. The enum values use the same columnInfo data source (from fetchColumns) but were unnecessarily deferred.

Changes

  • Add columnEnumValues field to ParsedSchemaMetadata
  • Parse TIER 1 enum values (synchronous string parsing from col.dataType) in parseSchemaMetadata — covers MySQL, MariaDB, ClickHouse
  • Apply parsed enum values in applyPhase1Result alongside FK data
  • Phase 2b now merges values instead of replacing, and only bumps metadataVersion if new values were found

Test plan

  • Open a MySQL/MariaDB table with ENUM columns — chevron-down should appear immediately on first open
  • FK chevron-right buttons still work on first open
  • Refresh table — enum values preserved, chevrons still visible
  • ClickHouse ENUM8/ENUM16 columns show chevrons on first open
  • PostgreSQL custom enum types still resolve (via Phase 2 async)
  • SQLite CHECK constraint pseudo-enums still resolve (via Phase 2 async)

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.

1 participant