Skip to content

Conversation

@dm15778521947-hub
Copy link

Summary

  • add a Next.js based "video-studio" workspace with Tailwind and shadcn-style UI primitives
  • build a studio layout featuring template upload, reference image management, prompt editing, and tag reordering
  • implement async video generation flow that calls Shengsuanyun APIs with polling, status tracking, and result previews

Testing

  • not run (node dependencies not installed in environment)

https://chatgpt.com/codex/tasks/task_e_68ca2f757b38832e8cadfd58b8406b75

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +36 to +40
const generate = useCallback(
async (payload: GenerationPayload) => {
abortRef.current = false;
try {
setState({ phase: "submitting", progress: 0 });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Prevent canceled pollers from updating new jobs

The hook uses a single abortRef to stop updates, but the polling loop keeps running after cancel() and generate() immediately resets the flag to false. If a user cancels an in‑flight job and starts another before the first job finishes, the old loop resumes dispatching updates because the flag has been cleared, overwriting the state with the canceled request’s progress and results. Consider using a per‑request token or aborting the previous loop before resetting the flag so canceled jobs cannot mutate the current state.

Useful? React with 👍 / 👎.

Comment on lines +79 to +80
if (data.status === "COMPLETED" || data.status === "FAILED") {
return result;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Exit poll loop for non-success terminal statuses

The polling loop only breaks when the task status is COMPLETED or FAILED. The API surface also returns other terminal states such as CANCELLED, TIMEOUT, or UNKNOWN; when any of these occur the loop will run forever, issuing requests every second and leaving the UI stuck in a pending state. The loop should return once the status is no longer progressing (e.g. anything other than IN_PROGRESS/QUEUED).

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants