Skip to content

fix(cli): warn when v2 detail lines are capped - #25

Merged
Warkanlock merged 1 commit into
mainfrom
eops-371-has-more-lines-warning
Sep 1, 2026
Merged

fix(cli): warn when v2 detail lines are capped#25
Warkanlock merged 1 commit into
mainfrom
eops-371-has-more-lines-warning

Conversation

@Warkanlock

Copy link
Copy Markdown
Contributor

Summary

  • V2 detail responses cap inline items at 100 and set has_more_lines + lines_count. Human detail never read either flag, so a 250-line journal entry looked complete.
  • Remaining lines cannot be fetched on v2 (/{resource}/{n}/lines/ moved to v2.0.0-alpha or was dropped). Warn instead of implying completeness.
  • JSON is unchanged — the flags are already in the payload.

Fixes EOPS-371

Changes

  • _warn_truncated_lines after every human detail render (JE, invoice, IJE, generic)
  • Copy: Warning: showing 100 of 250 lines. The API caps inline lines at 100.
  • Fallback when lines_count is missing: Warning: showing N lines. The API omitted the rest.
  • Tests in tests/test_output.py

Test plan

  • Unit tests pass (uv run pytest)
  • Linter passes (uv run ruff check .)
  • Live: journal-entries get 2 (2 lines) prints no warning
  • Live: invoices get 1 prints no warning
  • Org has no 100+ line JE to fire the warning live; unit test covers has_more_lines=True

V2 detail responses cap inline items at 100 and set
has_more_lines plus lines_count. Human output never read
either flag, so a 250-line journal entry looked complete.
Remaining lines cannot be fetched on v2, so warn instead.
Comment thread src/dualentry_cli/output.py
@Warkanlock
Warkanlock merged commit a9ca6b1 into main Sep 1, 2026
4 checks passed
Warkanlock added a commit that referenced this pull request Sep 1, 2026
Keep EOPS-368 has_* flags with EOPS-369 filter sets after
#25 and #26 landed. Paper-checks stay list/get only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant