Add column sorting functionality#35
Conversation
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR adds column sorting to the table view, wiring UI sort interactions through to the DuckDB-backed engine so that previews, row jumps, and missing-value navigation all respect the active sort order.
Changes:
- Add a sort stack to the UI model with
</>keybindings, header markers, and a footer sort summary. - Extend engine query APIs to accept optional stacked sort terms and apply them consistently for preview + offset/rowID lookups + null navigation.
- Update/expand unit tests across UI and engine to cover sorting behavior and sorted-order jumps.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/ui/model.go | Adds sort state, rendering markers/summary, key handling, and passes sort terms into engine calls. |
| internal/ui/model_test.go | Adds UI coverage for sort stacking/reset and sorted-order jump/null navigation; updates related expectations. |
| internal/engine/engine.go | Introduces SortTerm/SortDirection and threads sorting into preview + lookup/null-query paths. |
| internal/engine/engine_test.go | Adds engine tests for sorted preview, null ordering, and sorted offset/rowID lookups. |
| internal/engine/test_helpers_test.go | Updates mustPreview helper to accept optional sort terms. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a8f32eab4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
No description provided.