Skip to content

[jcode] Add H3 camera movement preset chips - #11

Merged
cnjack merged 3 commits into
mainfrom
jcode/run-2a4df9c1
Jul 31, 2026
Merged

[jcode] Add H3 camera movement preset chips#11
cnjack merged 3 commits into
mainfrom
jcode/run-2a4df9c1

Conversation

@cnjack

@cnjack cnjack commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Draft PR opened by jcode Cloud Agent for run 2a4df9c1ce737a5a2c7b8e96e25be9a7.

Triggered by a jtype kanban card.

Task

Add H3 camera movement preset chips

Context

MiniMax's official H3 guide recommends camera-motion cues such as pan, zoom,
tracking, and static shots. Creators should not have to remember or repeatedly
type the supported syntax. This request was produced from external product/API
research and intentionally enters Backlog before implementation approval.

Sources:

Requested outcome

Add accessible camera movement preset chips to the generation composer. A user
can insert a preset at the current prompt cursor without losing surrounding text.

At minimum include: Pan left, Pan right, Push in, Pull out, Tracking shot, and
Static shot. Keep the preset data in a small shared/pure module so labels and
inserted tokens are testable and are not duplicated across the UI.

Acceptance criteria

  • Preset controls are keyboard reachable, visibly focused, and have meaningful
    accessible names.
  • Activating a preset inserts its token at the current cursor/selection and
    preserves surrounding prompt text.
  • The resulting rendered prompt is still validated through the existing H3
    request policy before submission.
  • Unit/component tests cover insertion at start, middle, end, and replacement of
    a selection.
  • Lint, typecheck, tests, and production build pass.
  • Update README or in-product help if the interaction is not self-explanatory.

Delivery

Create a ready-for-review PR. Do not call the paid MiniMax API. Use mock mode for
all automated validation.

Adversarial review follow-up

PR #9 is not merge-ready yet. Before editing, fetch
origin/jcode/run-34055d9b and reset the Cloud working branch to exact commit
4e62adaa0ed6c57b9c6ea38c2df029e4eb41a20c. Preserve its intended feature and
fix these independently verified gaps without redesigning unrelated code:

  1. Preset chips must not be usable while template variables are unresolved; a
    user who clicks a chip before filling variables must never freeze the prompt
    to only the camera token. Add a component regression for this sequence.
  2. After the rendered prompt is touched, later variable edits must not silently
    submit stale prompt text with different recorded values. Track the values
    snapshot used by the override, disable generation on a mismatch, show a clear
    recovery message, and allow Reset to rendered to restore a consistent prompt.
    Test fill → insert → change variable → blocked → reset → consistent submit.
  3. Server-side, always validate/render the immutable version with values even
    when a nonblank prompt override is supplied, so unresolved variables and
    template syntax errors still fail before any job/provider call. The validated
    override remains the final rendered prompt after this validation succeeds.
  4. Add a retry regression proving a failed job with parameters.prompt retains
    the camera-cue override on retry instead of falling back to version rendering.
  5. Correct the Carear typo. If practical, expose preset descriptions through
    aria-describedby rather than relying only on title.

Run frozen install if needed, lint, typecheck, all tests, and production build.
Baseline is 289 tests. Re-read every edited file after the gates. Do not call
paid MiniMax or add secrets. Cloud owns delivery and must create a Ready PR.

Final adversarial snapshot follow-up

PR #10 is not merge-ready yet. Before editing, fetch
origin/jcode/run-77ee5c87 and reset the Cloud working branch to exact commit
2cb5325afb3647bbff0fc5641ac1fe35d1eed7c3. Preserve all existing camera
preset and consistency fixes. Make only this bounded repair:

  1. Replace snapshotValues' newline/equals concatenation with an unambiguous,
    deterministic encoding of sorted key/value tuples, for example
    JSON.stringify(Object.keys(values).sort().map((key) => [key, values[key] ?? ''])).
  2. Add a focused component/unit regression using the exact distinct records
    { a: "x\nb=y", b: "z" } and { a: "x", b: "y\nb=z" }. Prove their
    snapshots differ and that changing between them marks a touched prompt stale
    (extract the pure helper for direct testing if the DOM's text input sanitizes
    newlines). Keep key-order independence covered.
  3. Re-run frozen install only if needed, lint, typecheck, all tests, and the
    production build. Baseline is 295 tests. Re-read each edited file after the
    gates.

Do not redesign unrelated UI, call paid MiniMax, add secrets, or merge prior
PRs. Cloud owns delivery and must create a Ready PR from this exact cumulative
base.

Branch jcode/run-2a4df9c1 @ 3453d87a1c453fdeae15f8c8f8d3b05e01bfac12.

Not auto-merged and CI is not auto-triggered — review and iterate.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@cnjack, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 68b3c578-282d-4e6c-8cea-1a0a2b4b4b68

📥 Commits

Reviewing files that changed from the base of the PR and between f41af8c and 3453d87.

📒 Files selected for processing (15)
  • README.md
  • packages/client/src/features/Composer.test.tsx
  • packages/client/src/features/Composer.tsx
  • packages/client/src/features/promptSnapshot.test.ts
  • packages/client/src/features/promptSnapshot.ts
  • packages/client/src/styles.css
  • packages/server/src/__tests__/services.test.ts
  • packages/server/src/__tests__/util.test.ts
  • packages/server/src/services/generationService.ts
  • packages/server/src/util.ts
  • packages/shared/src/__tests__/cameraPresets.test.ts
  • packages/shared/src/__tests__/schemas.test.ts
  • packages/shared/src/cameraPresets.ts
  • packages/shared/src/index.ts
  • packages/shared/src/schemas.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cnjack
cnjack merged commit 389ce61 into main Jul 31, 2026
1 check passed
@cnjack
cnjack deleted the jcode/run-2a4df9c1 branch July 31, 2026 23:50
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