Skip to content

Include task ID and command in status line messages#14

Closed
himattm wants to merge 2 commits intomainfrom
mmckenna/fix-status-line-task-name
Closed

Include task ID and command in status line messages#14
himattm wants to merge 2 commits intomainfrom
mmckenna/fix-status-line-task-name

Conversation

@himattm
Copy link
Collaborator

@himattm himattm commented Feb 5, 2026

Summary

  • Fixed status line showing only task ID instead of command name when a task is promoted from waiting to running
  • All status line messages now include task ID and truncated command preview (max 50 chars)
  • Makes it easier to identify which task is running when multiple tasks are queued

Test plan

  • Existing tests pass
  • Queue multiple tasks and verify status line shows command name when task is promoted

🤖 Generated with Claude Code

When a task was promoted from waiting to running, the status line only
showed the task ID number instead of the command name. This made it
hard to identify which task was running when multiple tasks were queued.

All status line messages now include the task ID and a truncated command
preview (max 50 chars) for better visibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves status line messages in the task queue by including task IDs and truncated command previews (max 50 characters) in all status messages. Previously, only the task ID was shown when a task was promoted from waiting to running, making it difficult to identify which task was executing when multiple tasks were queued.

Changes:

  • Added command preview (truncated to 50 chars) to the initial "queued" message
  • Updated waiting status messages to include task ID
  • Enhanced lock acquisition message to show both task ID and command preview
  • Added task ID to the completion message

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Compute cmd_preview once at function start instead of twice
- Handle None command gracefully by omitting from message instead
  of showing "(None)" or "Running: None"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)
if ctx:
await ctx.info(log_fmt("Lock ACQUIRED. Starting execution."))
msg = f"Task #{task_id} lock ACQUIRED.{f' Running: {cmd_preview}' if cmd_preview else ''}"
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

When cmd_preview is empty or None, the status message ends abruptly with "Task #{task_id} lock ACQUIRED." without any indication that execution is starting. The original message included "Starting execution." which provided clearer context. Consider adding ". Starting execution." when cmd_preview is not available to maintain clarity.

Suggested change
msg = f"Task #{task_id} lock ACQUIRED.{f' Running: {cmd_preview}' if cmd_preview else ''}"
msg = (
f"Task #{task_id} lock ACQUIRED."
f"{f' Running: {cmd_preview}' if cmd_preview else ' Starting execution.'}"
)

Copilot uses AI. Check for mistakes.
if pos != last_pos:
if ctx:
await ctx.info(log_fmt(f"Position #{pos} in queue. Waiting..."))
await ctx.info(log_fmt(f"Task #{task_id} is position #{pos} in queue. Waiting..."))
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The message has a grammatical issue. "Task #{task_id} is position #{pos}" is missing the preposition "at". It should read "Task #{task_id} is at position #{pos} in queue. Waiting..." for proper grammar.

Suggested change
await ctx.info(log_fmt(f"Task #{task_id} is position #{pos} in queue. Waiting..."))
await ctx.info(log_fmt(f"Task #{task_id} is at position #{pos} in queue. Waiting..."))

Copilot uses AI. Check for mistakes.
@himattm himattm closed this Feb 5, 2026
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.

1 participant

Comments