Ledger filtering: --where queries and a viewer bottom pane - #23
Conversation
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
…e viewer Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
A failed field query only restored shown/query when the input was already closed, so an error delivered while `/` was reopened left a stale preview on screen and Esc could not get back to the real state. Track appliedShown/appliedQuery separately from the Esc snapshot so an error always has a known-good state to fall back to, and Esc restores both the rows and the query text together. Also move the tokenizer test table into graph/testdata/tokenizer_cases.json so tests/test_where.py and graph/main_test.go read one fixture instead of two hand-copied tables, note where Go and Python case-folding disagree, and make filterTimeout a var so tests can exercise the callback timeout without waiting 10 seconds. Signed-off-by: NovusEdge <novusedge0@gmail.com>
At heights 4-7 the status line was appended before "? help", which truncated the help hint below about 45 columns. Put "? help" first. docket/cli/graph.py's local env dict shadowed the imported env module; rename it to child_env. Signed-off-by: NovusEdge <novusedge0@gmail.com>
Signed-off-by: NovusEdge <novusedge0@gmail.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (19)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe change adds query filtering to ChangesLedger query filtering
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
actor User
participant GraphViewer
participant FilterModel
participant DocketCLI
User->>GraphViewer: Enter a field query
GraphViewer->>FilterModel: Submit query
FilterModel->>DocketCLI: Run _filter-ids with query
DocketCLI-->>FilterModel: Return matching record IDs
FilterModel-->>GraphViewer: Update visible rows and status
Merge Risk: ⚪ Minimal · up to The new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 10.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 134 functions across 13 files. (6 skipped: 6 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 SkillSpector (2.11.0)SkillSpector batch scan produced no output Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit taps a query key, Comment |
Summary
docket listanddocket graphtake--where QUERY, a small query language parsed in one place,docket/where.py. The graph viewer uses the same language through its/prompt, and gains a bottom pane for filter, status, and key hints.kind:,state:,scope:PATHandscope:DIR/,is:pinned|corrected|retired|blocked,author:,branch:,after:,before:, and bare or quoted text. Repeated positive terms on one field are ORed,is:terms are ANDed,-negates a term, and different fields are ANDed.is:blockedkeeps the viewer's meaning: an adopted, current decision that is not applicable.scope:asks which records govern a path, and it also matches top-level files.listincludes retired records when the query asks foris:retired.graph --formatand the no-viewer fallback honour--where. An invalid query exits 1 before the viewer starts.docket _filter-idsthrough a JSON argv inDOCKET_GRAPH_FILTER_CMD. The CLI uses an environment variable because an older viewer binary exits on an unknown flag.?opens a full help overlay.Test plan
just test: 902 Python tests OK (6 skipped), plus the graph and installer Go suitesjust lint: ruff format and check, pyrefly, golangci-lint (graph, installer)cd graph && go test -race ./...--where=-kind:question,_filter-ids -- -kind:question,is:retiredwith--format, invalid query before launch🤖 Generated with Claude Code
Summary by CodeRabbit
--wherefiltering todocket listanddocket graph, with support for text searches and terms for kind, state, scope, status, author, branch, and dates. Negation and quoted values are supported.?help overlay. Filters can be cleared to show all records./in the graph viewer now opens query filtering instead of the previous single-substring search.