Repository navigation
feat(sessions): search history before a date with --until - #595
Merged
Merged
Conversation
Owner
Author
|
@coderabbitai full review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
codegraph sessionsand thecodegraph_sessionstool can now search history before a date:--until 2026-10-20(CLI) anduntil: "2026-10-20"(MCP).Until now a search could only look back a number of days (
--since,sinceDays). Its best 100 hits come from whatever matches best, so for a common word the newest sessions filled the list and older context could not be reached. Withuntil(andsincefor the lower edge) a search can target any window.untiltakes a date, read as midnight UTC, or a timestamp that names its zone (2026-10-20T05:00:00-06:00). A day that does not exist (2026-02-30) and a timestamp with no zone are refused with a message, as the other bad arguments are, because accepting them moves the cutoff to a different day or to the machine's time zone. The bound is exclusive, like the end of a date range. The--projectfan-out passes it through.Checks: the full suite passed on the first commit (936 files, 11,202 tests,
tscclean). After the review fixes, the sessions, CLI and fan-out tests pass (76) andtscis clean. New tests cover the library bound (before, after, window),parseUntil(dates, timestamps, nonexistent days, zone-less text), mixed stored timestamp spellings against one cutoff and the CLI (--untilfiltering and a refused value).Review: a read-only review before this PR found three issues and the bot reviewer then found a fourth. All four are fixed with a failing test first: nonexistent calendar dates, zone-less timestamps, and stored timestamps whose spelling does not sort by time as text (
12:00:00Zafter12:00:00.500Z;+00:00offsets). Theuntilcomparison now uses SQLite'sjuliandayon both sides. The existingsincebound still compares as text; that is unchanged here.README rows checked: the
codegraph sessionsflag list in README.md andsite/.../reference/cli.mdnow includes--until; the server instructions and the CHANGELOG are updated.