Show more interactive job status and move completed jobs to History#1633
Merged
Show more interactive job status and move completed jobs to History#1633
Conversation
- Add WAITING to active jobs filter so pending jobs appear as cards - Show COMPLETE/FAILED/STOPPED interactive jobs in History via JobsList - Comment out TaskTemplateList in History (to be removed later) - Limit error message display size in JobProgress - Hide Output and Files buttons for interactive jobs in JobsList - Update empty state message
live_status is now stored as a display-ready string (e.g. "Remote command started") rather than a code (e.g. "started"). The frontend renders it directly instead of mapping codes to messages. Updated: remote_trap.py, lab_facade.py, remote_job_status_service.py, JobProgress.tsx, and corresponding tests.
Set live_status at each phase of LocalProvider.launch_cluster(): - "Preparing environment" before venv creation - "Running setup" before setup commands run - "Starting service" before the run command launches This fills the visibility gap between job creation and tfl-remote-trap taking over with "Remote command started".
Makes live_status updates visible more quickly in the UI.
The previous approach called job_service via asyncio.run() from the executor thread, which failed because the org context var wasn't propagated. Switch to a callback pattern: the queue worker (which has the right async context) passes an on_status callback to launch_cluster(), using run_coroutine_threadsafe to bridge the thread boundary.
run_coroutine_threadsafe doesn't propagate contextvars from the calling task. Set the organization_id explicitly in the coroutine so the job directory can be resolved correctly.
This reverts commit 2803287.
This reverts commit c2977bb.
- Add note about reinstalling lab-sdk after changes (cd lab-sdk && pip install -e .) - Point agents to relevant docs based on whether they're working on frontend or backend - Document context var pitfall: org_id doesn't propagate to new threads/coroutines and must be set explicitly
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
deep1401
reviewed
Mar 25, 2026
|
|
||
|
|
||
| REMOTE_JOB_STATUS_INTERVAL_SECONDS = int(os.getenv("REMOTE_JOB_STATUS_INTERVAL_SECONDS", "15")) | ||
| REMOTE_JOB_STATUS_INTERVAL_SECONDS = int(os.getenv("REMOTE_JOB_STATUS_INTERVAL_SECONDS", "5")) |
Member
There was a problem hiding this comment.
I'm going to switch this back because this causes some bugs when checking for empty jobs
deep1401
reviewed
Mar 25, 2026
Member
deep1401
left a comment
There was a problem hiding this comment.
Running remote jobs are being marked complete which brings back an older error er used to have.
Weirdly live_status also doesn't move past "live_status": "Lab initialized"
Will figure out what the error is
deep1401
reviewed
Mar 25, 2026
Member
deep1401
left a comment
There was a problem hiding this comment.
Just adding a comment that the bug is fixed. I'll hold off on approval until we build so we dont accidentally merge
deep1401
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WAITINGto the active interactive jobs filter so pending jobs appear as cardsJobsListTaskTemplateListin History (to be removed later)JobsListjob_data.live_statusinstead of codes (e.g."Remote command started"instead of"started")live_statusupdates during local provider job launch phases: "Preparing environment", "Running setup", "Starting service"live_statuscallback in queue worker (contextvars don't propagate viarun_coroutine_threadsafe)JobProgressTest plan