Repository navigation
fix(cli): timeline delete --start/--end removes only that range - #5867
Merged
Merged
Conversation
timeline delete accepted --start and --end but never read them, so a range delete removed the whole clip. It now cuts out only that range, the same way split, split, delete would, and keeps the parts before and after. Every edit verb shared one flag set, so a verb silently ignored flags it does not use. Each verb now declares only the options it reads, from one table that also checks apply-plan keys, so an unused flag or key is refused before anything is written.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
somanshreddy
approved these changes
Oct 19, 2026
somanshreddy
left a comment
Contributor
There was a problem hiding this comment.
Approving at 9bbfc128, the delta from my reviewed head 4daac817. It's one commit that renames MUTATION_FIELDS to FIELDS_READ_BY_VERB at every site that uses it (commands/timeline.ts, a2Commands.ts, a2Shared.ts) and drops two comments. There's no behaviour change. My review at 4daac817 stands, including the should-fix: the docs still show delete --start/--end without a "Since 0.8.174" note, while released CLIs up to 0.8.173 remove the whole clip.
— Somu
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.
What a user sees
Before:
hyperframes timeline delete <clip> --start 2 --end 3accepted both flags, never read them, and removed the whole clip.--planshowed an empty after-list. Every edit verb shared one flag set, sosplit --start,delete --at,duplicate --overwriteand the like were accepted and silently ignored. Anapplyplan edit like{"verb": "delete", "ref": "#clip", "at": "2"}was the same.After:
timeline delete <clip> --start a --end bremoves only[a, b). The part beforeaand the part afterbstay, exactly assplit,split,deletewould leave them (it reusessplit, so a video's tail keeps its media in-point and a sub-composition keeps its place). With one bound it cuts to the clip's edge; with neither it removes the clip as before. A range that reaches outside the clip, or is empty, is refused.Unknown flag: --xbefore anything is written, and anapplyedit with a key its verb does not use is refused (delete does not use at). One table (MUTATION_FIELDS) is the single source for both the CLI flags and the plan keys.<time>,--overwrite,--snap--start,--end,--duration,--overwrite,--snap<time>,--snap--start,--end,--snap<field>=<value>,--volume,--rate,--track--at,--snapAll also take
--dir,--plan,--json.Tests
packages/cli/src/timeline/timeline.e2e.test.ts: range delete on a video clip (plan and apply), out-of-clip range refusal, five verb/flag pairs refused without writing, and an apply key refusal. The range-delete and unused-flag tests fail onmain(range delete returns an empty after-list there) and pass here. Timeline and flag-guard suites: 147 passed, 3 runs in a row.