Skip to content

feat(cli, conversation): Add --from/--until to archive, unify TimeThreshold#636

Merged
JeanMertz merged 4 commits into
mainfrom
prr203
May 13, 2026
Merged

feat(cli, conversation): Add --from/--until to archive, unify TimeThreshold#636
JeanMertz merged 4 commits into
mainfrom
prr203

Conversation

@JeanMertz
Copy link
Copy Markdown
Collaborator

Extend jp c archive with --from, --until, and --yes flags to
match the ergonomics already offered by jp c rm. All three filter
flags (--from, --until, --inactive-since) AND-compose when
combined, letting users target a precise slice of conversations by
creation date and inactivity in a single command.

The default no-target behaviour of jp c archive has also been
corrected: instead of opening the picker, it now mirrors jp c show and
resolves to the session's active conversation (falling back through
conversation.default_id to the picker only when no session context is
available).

On the jp c rm side, --from/--until previously accepted raw
ConversationId values. They now accept the full TimeThreshold syntax
(relative durations, absolute dates, and conversation IDs), making both
commands consistent.

TimeThreshold itself gained a new parsing branch: passing a
conversation ID resolves to that conversation's embedded creation
timestamp. This means --from jp-c-… is a convenient shorthand for
"start from the moment that conversation was created", without having to
know or copy the exact date.

Unit tests were added for archive and rm covering the filter
matching logic, load-request routing, and the new TimeThreshold
conversation-ID parsing path.

Signed-off-by: Jean Mertz git@jeanmertz.com

JeanMertz added 4 commits May 13, 2026 17:12
…TimeThreshold`

Extend `jp c archive` with `--from`, `--until`, and `--yes` flags to
match the ergonomics already offered by `jp c rm`. All three filter
flags (`--from`, `--until`, `--inactive-since`) AND-compose when
combined, letting users target a precise slice of conversations by
creation date and inactivity in a single command.

The default no-target behaviour of `jp c archive` has also been
corrected: instead of opening the picker, it now mirrors `jp c show` and
resolves to the session's active conversation (falling back through
`conversation.default_id` to the picker only when no session context is
available).

On the `jp c rm` side, `--from`/`--until` previously accepted raw
`ConversationId` values. They now accept the full `TimeThreshold` syntax
(relative durations, absolute dates, and conversation IDs), making both
commands consistent.

`TimeThreshold` itself gained a new parsing branch: passing a
conversation ID resolves to that conversation's embedded creation
timestamp. This means `--from jp-c-…` is a convenient shorthand for
"start from the moment that conversation was created", without having to
know or copy the exact date.

Unit tests were added for `archive` and `rm` covering the filter
matching logic, load-request routing, and the new `TimeThreshold`
conversation-ID parsing path.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
…unify `TimeThreshold`

Signed-off-by: Jean Mertz <git@jeanmertz.com>
…unify `TimeThreshold`

Signed-off-by: Jean Mertz <git@jeanmertz.com>
…hive`, unify `TimeThreshold`

Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz JeanMertz merged commit 188200b into main May 13, 2026
14 checks passed
@JeanMertz JeanMertz deleted the prr203 branch May 13, 2026 21:31
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.

1 participant