Skip to content

Fix Cutroom ask/import/editor edge cases#2

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1777180365-second-review
Open

Fix Cutroom ask/import/editor edge cases#2
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1777180365-second-review

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

  • Parse the director ask CLI JSON envelope line-by-line instead of slicing from the last {, which broke when answers contained braces.
  • Preserve unique generated step IDs when importing a new recorder walkthrough with repeated action labels.
  • Validate editor-created step IDs/durations and reject duplicate IDs in reorder payloads before writing walkthrough.yaml.

Review & Testing Checklist for Human

  • Ask a walkthrough a question whose answer may include code/braces and confirm the response renders instead of failing JSON parse.
  • Import a recorder payload with repeated action labels and confirm generated walkthrough.yaml has unique step IDs.
  • Try adding/reordering steps from the editor with invalid IDs or duplicate reorder IDs and confirm the UI reports a validation error.

Notes

Local verification passed:

  • pnpm --filter cutroom typecheck
  • pnpm --filter cutroom lint
  • pnpm --filter cutroom build

Link to Devin session: https://app.devin.ai/sessions/de8e7422a81d49dc879a881ffef31cdf
Requested by: @lukataylo

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Tested Cutroom locally against PR #2. Escalation: live Claude-backed Ask was not tested because no Anthropic/LLM secret was available; I used a temporary test-only uv shim that emitted realistic director ask stdout with log lines plus a final JSON answer envelope containing braces.

Runtime test results
  • Passed — Ask widget rendered Use {cmd: "open"} on the Foley docs. without parse errors.
  • Passed — Ask citations intro and review_steps rendered and clicking review_steps scrolled to the matching docs step.
  • Passed — Recorder import accepted three repeated Click CTA labels and generated unique IDs: step_01_click_cta, step_02_click_cta, step_03_click_cta.
  • Passed — Imported walkthrough editor loaded with Edit · 3 steps.
  • Passed — Valid editor + Add step updated the editor to Edit · 4 steps.
  • Passed — Invalid explicit step ID ../bad returned append_failed and did not mutate YAML.
  • Passed — Invalid duration_ms: 499 returned duration_ms must be an integer between 500 and 30000 and did not mutate YAML.
  • Passed — Duplicate reorder IDs returned reorder_failed and did not mutate YAML.
Evidence

Recording: https://app.devin.ai/attachments/94831921-817d-4d39-ac7c-676342994798/rec-11605bfd-3c70-4ed5-b3eb-9b547b959045-subtitled.mp4

Full report: https://app.devin.ai/attachments/6dbb41f6-1cc7-4239-b57d-85375369ff6e/foley-pr2-test-report.md

Ask braces:
Ask answer with braces

Recorder import:
Imported duplicate-label walkthrough

API validation:
API validation results

Session: https://app.devin.ai/sessions/de8e7422a81d49dc879a881ffef31cdf

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