Skip to content

fix(cli): declare projectConfig on the scroll --until flag - #2472

Merged
thymikee merged 1 commit into
mainfrom
claude/fix-until-flag-project-config
Sep 10, 2026
Merged

fix(cli): declare projectConfig on the scroll --until flag#2472
thymikee merged 1 commit into
mainfrom
claude/fix-until-flag-project-config

Conversation

@thymikee

Copy link
Copy Markdown
Member

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):

src/commands/cli-grammar/flag-definitions-action.ts(144,3): error TS2322: Type '{ key: "until"; names: [string]; type: "string"; usageLabel: string; usageDescription: string; }' is not assignable to type 'FlagDefinition'.
  Type '{ key: "until"; ... }' is not assignable to type 'FlagDefinitionBody & { key: RecordableFlagKey; recorded: boolean; }'.
    Property 'projectConfig' is missing in type '{ key: "until"; ... }' but required in type 'FlagDefinitionBody'.

Cause

Two PRs, each green on its own base, landed in an order that broke main:

#2436 was never rebased onto #2453's stricter type, so its until declaration is missing both required fields.

Fix

Add projectConfig: true, recorded: false to the until declaration in src/commands/cli-grammar/flag-definitions-action.ts, matching its immediate siblings in the same file — the other Scroll: gesture flags durationMs (--duration-ms) and pixels (--pixels), which both carry projectConfig: true, recorded: false.

  • projectConfig: true matches the file's default posture for ordinary action parameters (per flag-registry.ts's projectConfigFlagKeys() / src/cli-schema/cli-config.ts, this only controls whether agent-device.json may set the flag; false is reserved for one-shot/session-lifecycle flags like --help, --version, --foreground, --save-script, none of which apply to --until).
  • recorded: false matches durationMs/pixels exactly: it keeps --until out of SessionAction.flags on the .ad recorder, 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 — passes
  • pnpm lint — passes
  • pnpm vitest run src/commands/cli-grammar/ — 3 files / 10 tests pass
  • pnpm check:layering — OK (221/221)
  • pnpm gate freerange (the "Check numeric ranges" CI step) — 0 findings
  • pnpm format then git status --short — touches only the one changed file

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.54 MB 4.54 MB +29 B
Package (unpacked) 4.54 MB 4.54 MB +29 B
Package (download) 1.35 MB 1.35 MB +14 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.1 ms 24.9 ms -0.2 ms
CLI --help 66.2 ms 67.4 ms +1.3 ms

@thymikee
thymikee merged commit 3e89f82 into main Sep 10, 2026
18 checks passed
@thymikee
thymikee deleted the claude/fix-until-flag-project-config branch September 10, 2026 16:00
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-10 16:01 UTC

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