Repository navigation
Release v1.0 - #84
Open
eduardofuncao wants to merge 8 commits into
Open
Release v1.0#84eduardofuncao wants to merge 8 commits into
eduardofuncao wants to merge 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces shared query libraries by moving saved queries into query_groups, so connections named {service}:{env} share one library across sibling environments while keeping per-connection settings (e.g., conn_string, last_query) separate. It also enhances the table viewer footer to show visual selection size and search match progress, and adds tests/docs for the new behavior.
Changes:
- Add
query_groupsto config with migration from legacy per-connectionqueries, plus helpers to access shared libraries (QueriesFor,SetQueriesFor,LiveConnection). - Update CLI commands to use shared libraries consistently (add/edit/list/remove/completion/status/etc.).
- Expand integration/unit test coverage and update documentation to describe shared libraries and migration behavior.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/integration/library_test.go | New integration tests covering shared-library behavior, migration, and GC of orphan groups. |
| test/integration/helpers_test.go | Adds helpers to write custom configs and manage multiple sqlite DB paths for integration tests. |
| SKILL.md | Documents the shared query library feature and links to configuration docs. |
| README.md | Adds a short mention/link for shared query libraries in the configuration section. |
| internal/table/view.go | Footer now shows selection dimensions in visual modes and match progress during search. |
| internal/table/search.go | Tracks current match index for cell/column search to display progress in the footer. |
| internal/table/model.go | Adds match index fields to the table model; minor formatting tweak. |
| internal/table/footer_test.go | New unit tests for footer rendering, selection bounds, and match progress behavior. |
| internal/config/query_saver.go | Saves queries into shared libraries (query_groups) via QueriesFor rather than per-connection maps. |
| internal/config/library.go | Introduces query-group keying, shared-library accessors, migration, and live-connection construction. |
| internal/config/library_test.go | New unit tests for group keying, shared mutation semantics, migration, and live connection behavior. |
| internal/config/connectionYAML.go | Deprecates per-connection queries in YAML; keeps it only for one-time migration input. |
| internal/config/config.go | Adds QueryGroups to config, initializes it, and runs migration during load. |
| docs/features.md | Mentions shared libraries and links to the configuration section. |
| docs/configuration.md | Adds a new “Shared query libraries” section with YAML example and migration notes. |
| docs/completion.md | Updates completion behavior description to reflect shared libraries. |
| docs/commands.md | Updates edit command description to clarify it edits the shared library for the current connection. |
| cmd/squix/tables.go | Switches to LiveConnection so table view uses shared query libraries. |
| cmd/squix/status.go | Status now counts queries from the shared library; uses LiveConnection. |
| cmd/squix/shell.go | Uses LiveConnection so shell uses shared query libraries. |
| cmd/squix/run.go | Uses LiveConnection so runs use shared query libraries. |
| cmd/squix/remove.go | Removes queries from shared libraries; connection removal keeps/drops group based on siblings and updates prompt/output. |
| cmd/squix/list.go | Lists queries from shared libraries and annotates {service}:{env} connections with their group key. |
| cmd/squix/info.go | Uses LiveConnection so info queries use shared libraries. |
| cmd/squix/explore.go | Uses LiveConnection for explore flows. |
| cmd/squix/explain.go | Uses LiveConnection for explain flow. |
| cmd/squix/edit.go | Edits shared libraries (in-place replacement so siblings observe changes). |
| cmd/squix/completion.go | Completion reads query names from the shared library for the current connection. |
| cmd/squix/add.go | Adds queries into the shared library for the current connection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
19
to
23
| printError("No active connection. Use 'squix switch <connection>' or 'squix init' first") | ||
| } | ||
|
|
||
| _, ok := a.config.Connections[a.config.CurrentConnection] | ||
| if !ok { | ||
| a.config.Connections[a.config.CurrentConnection] = &config.ConnectionYAML{} | ||
| } | ||
| conn := a.config.Connections[a.config.CurrentConnection] | ||
| if conn.Queries == nil { | ||
| conn.Queries = make(map[string]db.Query) | ||
| } | ||
| queries := conn.Queries | ||
| queries := a.config.QueriesFor(a.config.CurrentConnection) | ||
|
|
Comment on lines
20
to
22
| func (c *Config) SaveQueryToConnection(connName string, query db.Query) (db.Query, error) { | ||
| connData := c.Connections[connName] | ||
| queries := c.QueriesFor(connName) | ||
|
|
Comment on lines
+21
to
+22
| // cellMatchProgress and colMatchProgress returns the 1-based | ||
| // position of the match the cursor last landed on |
Comment on lines
+14
to
+17
| connections: | ||
| ecommerce:dev: {db_type: postgres, conn_string: postgres://dev-host/db} | ||
| ecommerce:prod: {db_type: postgres, conn_string: postgres://prod-host/db} | ||
| analytics: {db_type: sqlite, conn_string: analytics.db} # no colon → private group "analytics" |
eduardofuncao
force-pushed
the
release-v1.0
branch
from
August 6, 2026 12:02
d458413 to
ff42014
Compare
eduardofuncao
force-pushed
the
release-v1.0
branch
2 times, most recently
from
August 26, 2026 15:29
4f019d7 to
476ce7b
Compare
chore(groups): tidy up comments
Removed duplicate migration note and cleaned up text.
- foldable Tables/Views sections, / search with n/N match cycling - enter=SELECT *, c=columns metadata, r=relationships panel (async, shared spinner stages + timer), Tab=fold, H=help overlay - explorer_* actions configurable per mode in config.yaml feat(explore)!: consolidate tables/info into explore - remove 'squix tables' and 'squix info'; REPL \dt now opens explorer - drop RenderTablesList and isTablesList plumbing from table package - update help/completion for the new command surface
- update commands/features/keybindings/completion docs for explore - document explorer_* keybinding customization - add docs/getcolumnsinfo-design.md (rich per-column metadata plan) - refresh SKILL.md
eduardofuncao
force-pushed
the
release-v1.0
branch
from
August 31, 2026 16:14
476ce7b to
f390b12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.