fix(cli): declare projectConfig on the scroll --until flag - #2472
Merged
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
This was referenced Sep 10, 2026
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 broke
Main is red at 6d08de4 (CI run https://github.com/callstack/agent-device/actions/runs/34494219071; failing jobs: Typecheck & Package, Repo Guards "Check numeric ranges", Integration Tests):
Cause
Two PRs, each green on its own base, landed in an order that broke main:
feat(scroll): find off-screen targets in one command with --until) added theuntilflag declaration without aprojectConfig/recordedpair, which was valid at the time it branched.refactor(commands): declare project-config admission and recorder sanitization on the flag declaration) madeprojectConfig(andrecorded) required fields on everyFlagDefinition, and merged first.#2436 was never rebased onto #2453's stricter type, so its
untildeclaration is missing both required fields.Fix
Add
projectConfig: true, recorded: falseto theuntildeclaration insrc/commands/cli-grammar/flag-definitions-action.ts, matching its immediate siblings in the same file — the otherScroll:gesture flagsdurationMs(--duration-ms) andpixels(--pixels), which both carryprojectConfig: true, recorded: false.projectConfig: truematches the file's default posture for ordinary action parameters (perflag-registry.ts'sprojectConfigFlagKeys()/src/cli-schema/cli-config.ts, this only controls whetheragent-device.jsonmay set the flag;falseis reserved for one-shot/session-lifecycle flags like--help,--version,--foreground,--save-script, none of which apply to--until).recorded: falsematchesdurationMs/pixelsexactly: it keeps--untilout ofSessionAction.flagson the.adrecorder, consistent with how the other scroll-gesture parameters are treated.No other change. This is the smallest possible fix for the compile error.
Verification (in a fresh worktree off origin/main)
pnpm typecheck— passespnpm lint— passespnpm vitest run src/commands/cli-grammar/— 3 files / 10 tests passpnpm check:layering— OK (221/221)pnpm gate freerange(the "Check numeric ranges" CI step) — 0 findingspnpm formatthengit status --short— touches only the one changed file