Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): fix task link generation in AppStatuses component#20519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
johnstcn wants to merge4 commits intomainfromcj/task-by-workspace-id

Conversation

@johnstcn
Copy link
Member

@johnstcnjohnstcn commentedOct 28, 2025
edited
Loading

Fixes#20515

  • Adds an/api/experimental/task/workspace/{workspace} endpoint
  • UpdatesAgentRow to conditionally fetch the relatedTask ifworkspace.has_ai_task
  • Plumbs the task intoAppStatuses and updates theView task link with the task ID.

NB: Claude did help me out here, but I reviewed all of the generated code.

  • Non-task template:
Screenshot 2025-10-28 at 20 13 45
  • Task template:
Screenshot 2025-10-28 at 20 12 41
  • App status without task:
Screenshot 2025-10-28 at 20 12 35

@johnstcnjohnstcn self-assigned thisOct 28, 2025
@johnstcnjohnstcn changed the titleCj/task by workspacefix(site): fix task link generation in AppStatuses componentOct 28, 2025
Comment on lines +77 to +86
// Fetch task if workspace has an app status
const[task,setTask]=useState<Task|undefined>(undefined);
useEffect(()=>{
if(workspace.latest_app_status?.agent_id===agent.id){
API.experimental
.getTaskByWorkspaceID(workspace.id)
.then((task)=>setTask(task))
.catch(()=>setTask(undefined));// Ignore errors, task may not exist
}
},[workspace.id,workspace.latest_app_status?.agent_id,agent.id]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this instead make use ofuseQuery?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe something like

consttaskQuery=useQuery({queryKey:["tasks",workspace.id],queryFn:()=>API.experimental.getTaskByWorkspaceID(workspace.id),enabled:workspace.latest_app_status?.agent_id===agent.id,});

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but I think usingreact-query might require a deeper rearchitecture ofAgentRow.

Copy link
Contributor

Choose a reason for hiding this comment

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

@aslilac might be able to shed some light here (or tell me i'm wrong 😄)

@matifalimatifali added the cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch labelOct 29, 2025
@mafredri
Copy link
Member

Would it make sense to put a nullable task ID on the workspace instead?

@johnstcn
Copy link
MemberAuthor

johnstcn commentedOct 29, 2025
edited
Loading

Would it make sense to put a nullable task ID on the workspace instead?

Will give this a try.

EDIT: see#20543

@johnstcn
Copy link
MemberAuthor

Closing in favour of#20543

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 29, 2025
@mafredrimafredri deleted the cj/task-by-workspace-id branchOctober 29, 2025 15:33
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@DanielleMaywoodDanielleMaywoodDanielleMaywood left review comments

@mafredrimafredriAwaiting requested review from mafredri

Assignees

@johnstcnjohnstcn

Labels

cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

bug: Naviagting to a task from workspace page shows an error

5 participants

@johnstcn@mafredri@DanielleMaywood@matifali

[8]ページ先頭

©2009-2025 Movatter.jp