Skip to content

feat(cloud): cloud task service & rendering#932

Merged
tatoalo merged 2 commits intomainfrom
feat/twig/cloud-task-changes-and-status
Feb 18, 2026
Merged

feat(cloud): cloud task service & rendering#932
tatoalo merged 2 commits intomainfrom
feat/twig/cloud-task-changes-and-status

Conversation

@tatoalo
Copy link
Contributor

@tatoalo tatoalo commented Feb 17, 2026

Summary

  • Cloud session log rendering, cloud task session logs in Twig UI
  • Cloud changes panel, PR file changes for cloud tasks by fetching via gh with slurp pagination GitHub.
  • Cloud task status with icons feedback
  • SessionLogWriter visibility logging, this should help diagnose things from prod Sandboxes
  • Flush before completion, needed this before sandbox gets cleaned-up
  • Cloud watcher stack and CloudTask service

Before:

twig_cloud_run_before.mp4

After:

twig_cloud_run_after.mp4

@tatoalo tatoalo self-assigned this Feb 17, 2026
@tatoalo tatoalo marked this pull request as ready for review February 17, 2026 12:36
@tatoalo tatoalo requested review from a team February 17, 2026 12:36
Copy link
Contributor

@joshsny joshsny left a comment

Choose a reason for hiding this comment

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

noice - left some things to address, @charlesvien is thinking a bit about how to abstract local / cloud runs well in twig, so might be worth talking to him about that but it's not a blocker on getting this baby shipped 🚢

return { success: !!prUrl, message: prUrl ? "OK" : "No PR found", prUrl };
}

public async getPrChangedFiles(prUrl: string): Promise<ChangedFile[]> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do this based on a PR or based on a branch? We might not always push a PR, but we will always eventually push to the branch from the cloud run

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great point, basically I went with PR due to the thought of this being a long-ish running task and avoid back and forth of updating the state of changed files in the panel.
It does make more sense on the branch level though, you're right, can do this via compare on each commit push (so we don;t wait for the full-fledge PR opening).

I would probably keep the PR changed files path as ultimate source of truth when we do open a PR, just to avoid possible weird stale states, should be rare but still.

}
}

// Fallback: use session_logs API when presigned URL is missing or returned no data
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the advantage to the presigned url here, can we just use session logs all the time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense, refactored into using that.

requestFocus(taskId);
}, [taskId, requestFocus]);

// Cloud session loading — fetch S3 logs and create a read-only session
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic feels very messy, and should ideally be pulled out into a service with a trpc subscription for getting logs / status changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, felt like having something quick to test against Modal but just makes sense for this do be done proper first pass, did some work there. Thanks!

@tatoalo tatoalo changed the title feat(cloud): cloud task rendering feat(cloud): cloud task service & rendering Feb 18, 2026
chore: better pagination slurp

chore: log writer flush

chore: cleaner

chore: cleaner
@tatoalo tatoalo force-pushed the feat/twig/cloud-task-changes-and-status branch from ebcf7f4 to 16c9b11 Compare February 18, 2026 13:15
@tatoalo tatoalo merged commit 0399e76 into main Feb 18, 2026
11 checks passed
@tatoalo tatoalo deleted the feat/twig/cloud-task-changes-and-status branch February 18, 2026 13:15
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.

2 participants