Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Tasks: API: Add pagination and granular message control to logs endpoint

オープン
#1,247 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
領域
api, backend

調査の方向性

まず、タスクログのエンドポイント、coderd の既存のページネーションパターン、codersdk.Pagination を確認します。将来の ACP メッセージ型に対応できるようにしつつ、アクティブなログと一時停止中のスナップショットでページネーションをどのように機能させるべきかを判断します。アプローチが実装および文書化され、両方の状態についてテストされ、必要に応じて CLI が更新されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem

The task logs API (GET /api/v2/tasks/{user}/{task}/logs) currently returns the entire conversation history. This is not ideal for tasks with long-running conversations:

  • Large response payloads for tasks with hundreds of messages
  • No way to fetch specific message ranges
  • Inefficient for clients that only need recent messages or want to implement infinite scroll

Current Behavior

The API returns all messages in a single response:

{
  "logs": [...],  // All messages
  "snapshot": false,
  "total_count": 250
}

When a task is paused (post-implementation of pause/resume functionality), it returns the last 10 messages from the snapshot:

{
  "logs": [...],  // Last 10 messages
  "snapshot": true,
  "snapshot_at": "2025-01-18T10:00:00Z",
  "total_count": 10
}

Proposed Enhancement

Add pagination support to the logs endpoint. The exact implementation will depend on the message model after ACP integration, which may introduce more granular message types, status updates, and metadata beyond the current large text blocks.

Pagination should follow coderd's existing patterns (using limit, offset, and after_id query parameters as defined in codersdk.Pagination).

Key considerations:

  • With ACP, messages may be split into multiple granular events rather than 500-line text blocks
  • The message structure and metadata may evolve significantly
  • Pagination design should accommodate future message model changes

Context

Raised during RFC review for Task Start/Pause/Resume Lifecycle. Deferred from Beta/GA as it's an enhancement rather than blocking issue.

Acceptance Criteria

  • Design pagination approach that accommodates future ACP message model changes
  • Works for both active tasks (live logs) and paused tasks (snapshots)
  • Follows coderd's existing pagination patterns
  • Document pagination behavior
  • Update CLI if needed to support fetching message ranges

Related

  • RFC: Task Start/Pause/Resume Lifecycle
  • Future: ACP integration for message-level control
主要言語
言語のデータがありません
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/internal のほかの issue

coder/internal の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。