Skip to content

Release v1.0 - #84

Open
eduardofuncao wants to merge 8 commits into
mainfrom
release-v1.0
Open

eduardofuncao wants to merge 8 commits into
mainfrom
release-v1.0

Conversation

@eduardofuncao

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings August 1, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_groups to config with migration from legacy per-connection queries, 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 thread cmd/squix/add.go
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 thread internal/table/search.go
Comment on lines +21 to +22
// cellMatchProgress and colMatchProgress returns the 1-based
// position of the match the cursor last landed on
Comment thread docs/configuration.md
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
eduardofuncao force-pushed the release-v1.0 branch 2 times, most recently from 4f019d7 to 476ce7b Compare August 26, 2026 15:29
eduardofuncao and others added 8 commits August 31, 2026 13:13
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
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.

2 participants