-
Notifications
You must be signed in to change notification settings - Fork 99
5.3.0 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
5.3.0 #37
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
54a0a86
updated actions
m0n0x41d 89fb0fd
fix: wire module rescan into /q-refresh scan
m0n0x41d 93bb0b0
fix: C/C++ header-only modules from -I flags + symlink-safe include r…
m0n0x41d 0f4aa22
feat: FTS5 search keyword enrichment — agent-generated synonyms at wr…
m0n0x41d 1d2f4db
feat: interactive terminal dashboard + mode computation + scanner fixes
m0n0x41d 49d4a4f
fix: q-reason context-aware entry + 5.3.0 changelog
m0n0x41d 511d8a6
chore: update CI Go version to 1.25
m0n0x41d 9805c57
chore: update golangci-lint to v2.11.4 (Go 1.25 compat)
m0n0x41d b226332
chore: update lint config for golangci-lint v2.11 compat
m0n0x41d c6095bb
fix: address PR #37 review — activity feed, board exit code, decision…
m0n0x41d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,141 @@ | ||
| package cmd | ||
|
|
||
| import ( | ||
| "database/sql" | ||
| "fmt" | ||
| "os" | ||
| "path/filepath" | ||
|
|
||
| tea "charm.land/bubbletea/v2" | ||
| "github.com/spf13/cobra" | ||
|
|
||
| "github.com/m0n0x41d/quint-code/internal/artifact" | ||
| "github.com/m0n0x41d/quint-code/internal/project" | ||
| "github.com/m0n0x41d/quint-code/internal/ui" | ||
| ) | ||
|
|
||
| var checkMode bool | ||
|
|
||
| var boardCmd = &cobra.Command{ | ||
| Use: "board", | ||
| Short: "Interactive dashboard — decision health, coverage, drift, problems", | ||
| Long: `Launch the Quint Code dashboard. | ||
|
|
||
| Shows decision health, module coverage, drift alerts, problem pipeline, | ||
| and evidence quality in an interactive terminal UI. | ||
|
|
||
| Navigation: tab/1-4 switch views, j/k navigate, enter drill in, esc back, q quit. | ||
|
|
||
| Use --check for CI/hooks: exits with code 1 if critical issues exist | ||
| (R_eff < 0.3, decisions expired > 30 days).`, | ||
| RunE: runBoard, | ||
| } | ||
|
|
||
| func init() { | ||
| boardCmd.Flags().BoolVar(&checkMode, "check", false, "Health check mode: print summary and exit with code 1 if critical issues") | ||
| rootCmd.AddCommand(boardCmd) | ||
| } | ||
|
|
||
| func runBoard(cmd *cobra.Command, _ []string) error { | ||
| // Find project root | ||
| projectRoot, err := findProjectRoot() | ||
| if err != nil { | ||
| return fmt.Errorf("not a quint-code project (no .quint/ directory found): %w", err) | ||
| } | ||
|
|
||
| quintDir := filepath.Join(projectRoot, ".quint") | ||
|
|
||
| // Load project config | ||
| projCfg, err := project.Load(quintDir) | ||
| if err != nil { | ||
| return fmt.Errorf("load project config: %w", err) | ||
| } | ||
| if projCfg == nil { | ||
| return fmt.Errorf("project not initialized — run 'quint-code init' first") | ||
| } | ||
|
|
||
| // Open DB | ||
| dbPath, err := projCfg.DBPath() | ||
| if err != nil { | ||
| return fmt.Errorf("get DB path: %w", err) | ||
| } | ||
|
|
||
| // Open DB with WAL mode and busy timeout. | ||
| // MCP server may hold a write connection to the same DB — | ||
| // WAL allows concurrent readers, busy timeout prevents instant SQLITE_BUSY. | ||
| dsn := dbPath + "?_pragma=journal_mode(WAL)&_pragma=busy_timeout(3000)" | ||
| sqlDB, err := sql.Open("sqlite", dsn) | ||
| if err != nil { | ||
| return fmt.Errorf("open DB: %w", err) | ||
| } | ||
| defer sqlDB.Close() | ||
|
|
||
| store := artifact.NewStore(sqlDB) | ||
| projectName := projCfg.Name | ||
|
|
||
| // Load all data | ||
| data, err := ui.LoadBoardData(store, sqlDB, projectName, projectRoot) | ||
| if err != nil { | ||
| return fmt.Errorf("load board data: %w", err) | ||
| } | ||
|
|
||
| // Check mode: print summary and exit | ||
| if checkMode { | ||
| return runCheck(data) | ||
| } | ||
|
|
||
| // Interactive mode | ||
| model := ui.New(data, store, sqlDB, projectName, projectRoot) | ||
| p := tea.NewProgram(model) | ||
| finalModel, err := p.Run() | ||
| if err != nil { | ||
| return fmt.Errorf("board: %w", err) | ||
| } | ||
|
|
||
| // Interactive mode always exits 0 — user saw the dashboard. | ||
| // Use --check for non-zero exit on critical issues. | ||
| _ = finalModel | ||
| return nil | ||
| } | ||
|
|
||
| func runCheck(data *ui.BoardData) error { | ||
| fmt.Printf("Quint Code Health: %s\n", data.ProjectName) | ||
| fmt.Printf(" Decisions: %d shipped, %d pending\n", data.ShippedCount, data.PendingCount) | ||
| fmt.Printf(" Problems: %d backlog, %d addressed\n", len(data.BacklogProblems), data.AddressedCount) | ||
| fmt.Printf(" Stale: %d items\n", len(data.StaleItems)) | ||
|
|
||
| if data.CoverageReport != nil { | ||
| cr := data.CoverageReport | ||
| pct := 0 | ||
| if cr.TotalModules > 0 { | ||
| pct = (cr.CoveredCount + cr.PartialCount) * 100 / cr.TotalModules | ||
| } | ||
| fmt.Printf(" Coverage: %d%% (%d/%d modules)\n", pct, cr.CoveredCount+cr.PartialCount, cr.TotalModules) | ||
| } | ||
|
|
||
| if data.CriticalCount > 0 { | ||
| fmt.Printf("\n CRITICAL: %d issue(s) require attention\n", data.CriticalCount) | ||
| os.Exit(1) | ||
| } | ||
|
|
||
| fmt.Println("\n OK: no critical issues") | ||
| return nil | ||
| } | ||
|
|
||
| func findProjectRoot() (string, error) { | ||
| dir, err := os.Getwd() | ||
| if err != nil { | ||
| return "", err | ||
| } | ||
|
|
||
| for { | ||
| if _, err := os.Stat(filepath.Join(dir, ".quint")); err == nil { | ||
| return dir, nil | ||
| } | ||
| parent := filepath.Dir(dir) | ||
| if parent == dir { | ||
| return "", fmt.Errorf("no .quint/ found") | ||
| } | ||
| dir = parent | ||
| } | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handleQuintDecisionnow readsargs["search_keywords"], but thequint_decisionMCP input schema still does not declare that field (onlyquint_notewas updated). Schema-driven MCP clients typically omit undeclared arguments, so decision keyword enrichment is effectively unavailable in normal tool-calling flows.Useful? React with 👍 / 👎.