Skip to content

Display the task's current position in the queue - #614

Open
julien-nc wants to merge 5 commits into
mainfrom
enh/noid/queue-position
Open

Display the task's current position in the queue#614
julien-nc wants to merge 5 commits into
mainfrom
enh/noid/queue-position

Conversation

@julien-nc

@julien-nc julien-nc commented Jul 23, 2026

Copy link
Copy Markdown
Member

Poll the selected task's position every 5 seconds. Display it in the "loading" empty content.

  • In the loading empty content
image
  • In the chat UI
image

Todo

  • Adjust the message
  • Improve design

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@julien-nc julien-nc added enhancement New feature or request 3. to review labels Jul 23, 2026
@julien-nc
julien-nc force-pushed the enh/noid/queue-position branch from 4e0f58c to fc2090d Compare July 27, 2026 10:36
Comment thread src/assistant.js
Comment thread src/components/ChattyLLM/ChattyLLMInputForm.vue Outdated
}
this.loading = false
this.showSyncTaskRunning = false
this.taskPosition = null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we call cancelTaskPositionPolling() here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could but we don't need to. When the task status is not SCHEDULED anymore, the "get task position" endpoint will return a 412 code and the polling function will reject the promise and stop polling.

But cancelling as early as possible could save one network request. Let's do it.

Check my last commit. It cancels the position polling when we stop polling the task itself.

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…holder

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc
julien-nc force-pushed the enh/noid/queue-position branch from fc2090d to 8843543 Compare August 17, 2026 08:38
…PollPositionTimerId so pollPositionOnce does not exit and reject the promise

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
… chat UI

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…inished or failed)

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc
julien-nc requested a review from marcelklehr August 17, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants