Skip to content

Filter receipt listings by action and connection - #101

Merged
laaielichter merged 1 commit into
laaielichter:mainfrom
yinbowen-dc:feat/receipt-filters
Nov 18, 2026
Merged

laaielichter merged 1 commit into
laaielichter:mainfrom
yinbowen-dc:feat/receipt-filters

Conversation

@yinbowen-dc

Copy link
Copy Markdown
Contributor

Add exact action and connection filters to receipt listing, combined with status before applying the limit. Reuse the existing CLI connection option and retain summary-only output. Test each filter, combinations, empty matches and post-filter limiting, and update the CLI reference.

Validation: pytest -q (856 passed, 10 skipped in 39.32s), ruff check ., git diff --check. Added regression tests fail against the original implementation and pass with this change. PostgreSQL-specific tests were not run; no external warehouse was contacted.

Closes #93

@laaielichter laaielichter left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks @yinbowen-dc, this covers every item in the "Done when" list for #93: --action and --connection filters that combine with --status, --limit applied after filtering, an empty match returning ok with an empty list, the README line, a CHANGELOG entry and tests for each case. I merged it onto current main in a scratch checkout: ruff check . is clean and pytest -q gives 856 passed, 10 skipped.

I especially liked the test that checks the list stays summary-only (no preview leaks into the output) and that exercises both the function and main([...]).

CI for this PR is waiting for the maintainer's approval because it is your first contribution, so it may show as waiting for a while. If main moves before it lands, a quick git merge upstream/main is all that is needed; the CHANGELOG line is where a small conflict is likely.


Generated by Claude Code

Copy link
Copy Markdown
Owner

Hi @yinbowen-dc, a quick heads-up, and thank you for your patience. The maintainer approved and merged your #99 this morning (thanks for that one too), and it added a line at the top of ### Fixed in CHANGELOG.md, which is exactly where this PR adds its line. So #101 now conflicts with main in CHANGELOG.md only (I merged it in a scratch checkout: README.md and the code merge cleanly).

Could you merge the latest main of laaielichter/Gulliver into your branch and push? When Git asks about CHANGELOG.md, keep both lines: the #97 line from main and your #93 line, and leave every other line as it is. For example git fetch upstream && git merge upstream/main if you named the remote upstream. After that this PR is ready to land: my approval of the code (ruff clean, 856 passed on the earlier main) still stands, and the maintainer takes the final look. As before, CI waits for the maintainer's approval of the first run.

One thing to expect: #100 also adds a line near the top of ### Fixed, so whichever of the two lands second may need one more merge of main with the same "keep both lines" step.


Generated by Claude Code

Copy link
Copy Markdown
Owner

Good news: you no longer need to resolve the CHANGELOG conflict. We changed the rule so contributors don't edit CHANGELOG.md any more; we add your entry with credit when we merge. Easiest fix: drop your CHANGELOG.md change (or merge main and take main's version of the file) and push; the rest of the PR is unchanged.


Generated by Claude Code

@laaielichter laaielichter left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks @yinbowen-dc. The receipt filters work: --action and --connection combine, and removing the action filter makes 4 of the 6 new tests fail. Before this can merge:

  1. Merge main into the branch. The CHANGELOG.md entry conflicts. Please remove your CHANGELOG line, since the maintainer writes that entry.
  2. In README.md the line gulliver receipt --list [--limit N] ... became --limit 20. Please restore --limit N; the default is a separate fact.

Generated by Claude Code

laaielichter added a commit that referenced this pull request Nov 18, 2026
Land #101: Filter receipt listings by action and connection
@laaielichter
laaielichter merged commit 6f8ce1a into laaielichter:main Nov 18, 2026

Copy link
Copy Markdown
Owner

Thank you @yinbowen-dc for the receipt filters and for the thorough tests (each filter, combinations, empty matches and limiting after the filters). It is merged with your commit kept (landed through #202, which merges your branch head and only resolves a CHANGELOG.md conflict), and the credit is in the CHANGELOG under Unreleased. I checked it on the merged code: receipt --list --action run and --connection filter as described, and the new tests fail when the filtering is removed.

One small thing I noticed, not a problem with your change: when a filter matches nothing, the empty-list message that landed on main in the meantime still says "No receipts with status 'None'." I will look at that separately.

If you want a next one, #159 (translate the README quick start into your language) is free and labelled good first issue.


Generated by Claude Code

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.

gulliver receipt --list: filter by --action and --connection

2 participants