Skip to content

feat: table view, Spaces/Connections settings pages, UI fixes - #108

Merged
sao-coding merged 6 commits into
mainfrom
feat/table-view-and-settings-pages
Dec 4, 2026
Merged

sao-coding merged 6 commits into
mainfrom
feat/table-view-and-settings-pages

Conversation

@sao-coding

Copy link
Copy Markdown
Owner

What

  • Table view. Double-click a table in the Schema panel (a single click expands it) to see its rows at full height, with no SQL editor. The bar on top has a WHERE box and a SQL button that opens the full query in a normal query tab. Sort by clicking a column header: it re-runs the query with ORDER BY. An already open view of the same table is focused, not duplicated. The view, with its WHERE and sort, is saved with the Space and loads again when first shown after a restart.
  • Settings › Spaces and Settings › Connections. List, edit and add Spaces and connections. Import from DBeaver or a .env file, and export connections as JSON without passwords.
  • Query tabs. Results get 65% of the height by default, and the editor/results divider remembers where you drag it.
  • Sorting. Every grid cycles ascending → descending → none. Query tabs still sort loaded rows in memory, but now numbers compare by value (9 < 10).
  • Fixes. Opening Settings stays in the current Space instead of jumping to another one. The result tab label and count are centred together, and tabs keep their padding when crowded. The sidebar search box, Connections header and + button share one gutter.

Notes

  • New test-only shell/ui_inspect.rs: renders a view headless, dumps element bounds to JSON and asserts alignment and padding. The alignment fixes above are covered by it.
  • Checked by hand in the app against a PostgreSQL database: table view, WHERE, header sort, SQL button, restore after restart, single and double click. In-memory sort on a normal query tab was not clicked through by hand; its cycle is unit-tested.
  • No TablePlus import yet; the import button lists DBeaver and .env only.
  • cargo fmt --check, both clippy runs and cargo shear are clean. cargo test -p app and -p locus-core --lib pass. The locus-core integration tests need a live database and were not run.

Minor changeset included.

…Space Settings

- Settings gains Spaces and Connections pages: edit/create Spaces, edit/create
  connections, import from DBeaver or .env, export connections without passwords.
- Opening Settings stays in the active Space instead of jumping to another
  Space that already has a Settings tab.
- Result tab label and count are centred together, tabs keep their padding
  when crowded, and the sidebar search box and Connections header share a gutter.
- Test-only ui_inspect module: dump element bounds of a headless render and
  assert alignment, centring and padding; covers the fixes above.
…ults by default

- Opening a table (single click in the object tree, the palette, or the ER
  diagram) shows its rows at full height with a WHERE box, a sort picker and a
  SQL button that opens the view's full query in a normal query tab. An already
  open view of the same table is focused instead of duplicated.
- Table views are saved with the Space and reload their rows when first shown
  after a restart; the toolbar shows Refresh instead of Run for them.
- Query tabs give the results 65% of the height by default and remember the
  divider position the user drags to.
… sidebar +

- In the object tree a single click expands a table to its columns and a
  double click opens it as a table view (tooltip updated in all locales).
- The table view's sort direction arrow sits right after the sort button
  without overlapping it (a negative margin made their hit areas overlap).
- The Connections header row uses the search box's 12px gutter on both sides,
  so the + button no longer reaches 4px past the search box.
- ui_inspect tests cover both: sort/arrow touch without overlapping, and the
  + button and search box share a right edge.
- Table views drop their own sort dropdown; the bar keeps only WHERE and SQL.
  Clicking a column header's sort icon re-runs the view with ORDER BY, the
  header arrow shows the view's order (also after a restart), and loaded rows
  are never reordered in memory.
- Every grid cycles ascending -> descending -> none, worked out from the sort
  shown rather than the table library's own none -> descending -> ascending.
- Query tabs still sort loaded rows in memory, now by column type: numbers by
  value (9 < 10, negatives, decimals, big integers), NULL first, other types
  as text.
@sao-coding
sao-coding merged commit 47fbf18 into main Dec 4, 2026
9 checks passed
@sao-coding
sao-coding deleted the feat/table-view-and-settings-pages branch December 4, 2026 06:57
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