rtk jira: filtered output keeps trailing line padding — 30-39% of the result is spaces (v1.0.1)
Maintainers usually reply within 1 day
@umi008 is already working on this.
Since Oct 21, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
Research direction
Start by reading the Jira filter added in #635 and trace the output path for jira issue view; the issue does not name a source file or test. Check how it handles line endings, trailing spaces, and blank lines, then verify the filtered output has close to 0% trailing padding while preserving the ticket content. The author is willing to send a PR, but is waiting for maintainer confirmation on the approach.
Written by the indexing model from the issue text.
Description
Summary
The jira filter added in #635 (shipped v0.49.0) strips blank lines and separators, but leaves every line space-padded to the box width that jira-cli drew. On a terminal that wraps anyway, that padding is pure token cost: it is 30–39% of the filtered output.
Verified on v1.0.1 (homebrew, macOS arm64).
Measurement
Two real tickets, jira issue view <KEY> --plain through rtk:
| Ticket | rtk output | of which trailing padding | lines |
|---|---|---|---|
| A (29 lines) | 3,321 chars | 1,324 (39%) | 29 |
| B (43 lines) | 4,878 chars | 1,485 (30%) | 43 |
Per-line, the first three lines of a filtered view:
1: len=111 trailing_spaces=22
2: len=118 trailing_spaces=23
3: len=114 trailing_spaces=30
Repro
rtk jira issue view <ANY-KEY> --plain | python3 -c "
import sys
t = sys.stdin.read()
pad = sum(len(l) - len(l.rstrip()) for l in t.split(chr(10)))
print(f'{len(t)} chars, {pad} trailing padding ({100*pad//len(t)}%)')
"
Expected: close to 0% padding. Actual: 30–39%.
Why it is worth a one-liner
rstrip() per line before joining. No behaviour change — the padding carries no information, the box borders are already stripped by the existing filter, and nothing downstream can depend on column alignment once the separators are gone. It is the single largest remaining cost in the jira filter's output, and it compounds on every issue view and issue list an agent makes.
A related, smaller one: runs of consecutive blank lines survive in some views; collapsing them to one is the same pass.
Note on #524
#524 was closed as completed on the strength of #635, which is fair — output is filtered now. This is not a regression of that, just the next layer down.
Happy to send a PR if a maintainer confirms the approach (plain rstrip on each line in the jira filter's output path) is what you'd want.
- Dominant language
- Rust
- Stars
- 85k
- Forks
- 5.4k
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 60
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rtk-ai/rtk
-
area:cli bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
pnpm install wrapper drops the child's stdout on failurePossibly taken A pull request linked to this issue is open or already merged. Openarea:cli bug good first issue priority:medium
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
`rtk dotnet test` counts a project once per output line that names its `.csproj`Possibly taken @ecoyoung claimed this 1 day ago. Openarea:cli bug dotnet good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
rtk-ai/rtk#4844 · 2 comments ·
Maintainers usually reply within 1 day
-
rtk git show <commit>: truncation hint points to `rtk git diff --no-compact`, which does not show the commitPossibly taken @vshalpnjabi claimed this 2 days ago. Openarea:cli bug good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
rtk-ai/rtk#4817 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Windows: .hook_warn_last mtime never advances, so the daily hook reminder prints on every commandPossibly taken @ShryukGrandhi claimed this 6 days ago. Openarea:cli bug good first issue platform:windows priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rtk-ai/rtk#4746 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
storytold/craft-libs#471 ·
Maintainers usually reply within 1 day
-
enhancement parity priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
storytold/gridcraft#3053 · 1 comment ·
Maintainers usually reply within 2 days
-
bug file-compat parity priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
i18n multiple issues parity priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
storytold/vectorcraft#4943 · 3 comments ·
Maintainers usually reply within 1 day