Repository navigation
feat(drip): add drip history --clear and a history size setting - #100
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
drip-web | a9c21f7 | Nov 10 2026, 06:52 PM |
history = 0..1000 in the config and DRIP_HISTORY set how many cards the history keeps. 0 keeps none. Cards held for a locked screen or a pause use their own file and still play back.
The foreground drip resolves history (DRIP_HISTORY, then the config, then 1000) and hands it to the background drip, so a drip that records no longer reads the config itself. An invalid DRIP_HISTORY is a usage error like DRIP_STACK_MAX. A lower limit trims the file on the next record, and 0 empties it. Integer settings share one ranged helper in the config and the environment.
deliver() gets the size the command's own resolver gave instead of reading the environment and the config again, and nil means a replay that records nothing. A size of 0 stops recording and leaves history.jsonl alone, and only drip history --clear deletes it. LockedScreen has no default size, BackgroundRequest.historyLimit holds the fallback, CardHistory.limit is gone, and clear() returns before it takes the lock when there is no file.
jrnxf
force-pushed
the
launch/c-history-clear
branch
from
November 10, 2026 18:49
3de415f to
a9c21f7
Compare
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.
Users can now empty their card history with
drip history --clear. They can also set its size, or stop recording, withhistory = 0..1000in the config or withDRIP_HISTORY.To review (about 15 min): read
History.swiftand how the limit reachesdeliver()inCLI.swiftandDelivery.swift.Manual check (2 min, after CI is green):
drip history --clear; echo $?prints 0, anddrip historylists nothing.history = 0in the config and rundrip hi.drip historystill lists nothing.history = 0. It still comes back.What changed:
--clearemptieshistory.jsonlunder the file lock. Used with any other history option, it is a usage error. A failed clear exits 1.DRIP_HISTORY, then config, then 1000. It goes to the recorder with the card, so nothing reads the config again.--cleardeletes the cards from before. A lower number above 0 trims the file when the next card is recorded.config.md,usage.md, and the troubleshooting privacy section.Evidence: before,
drip history --clearprintedunknown option '--clear'and exited 2. After, it exits 0 and the file is empty.history = 5000exits 4 with "history: must be between 0 and 1000".swift buildpasses. The tests did not compile locally (the Testing module is missing), so CI is the first test run./code-reviewran twice, and all 18 findings are fixed.Risk: two-way door. Blast radius: history.