Skip to content

feat(frontend): implement real API for task table page#244

Draft
sousuke0422 wants to merge 6 commits into
mainfrom
feat/task-table-real-api
Draft

feat(frontend): implement real API for task table page#244
sousuke0422 wants to merge 6 commits into
mainfrom
feat/task-table-real-api

Conversation

@sousuke0422

Copy link
Copy Markdown
Contributor

実際のapiを使うように。
ついでにsbに毎日差分出るの予防。

- Replace inline mock data with real API queries via fetchClient
- Implement query flow: list_projects → find project_id → parallel list_tasks + list_statuses
- After tasks resolve, fetch list_assignees per task via Promise.all
- Resolve status_id → {name, color} from statuses list via Map
- Assignee: UUID stub display (grey circle + ? icon) with console.log + TODO
- Update PRIORITY_CONFIG for all API TaskPriority values (CriticalFire..Trivial)
- due_date uses tasks.Model.soft_deadline
- Remove all Date.now()/new Date() mock data
- Update Storybook to fetch mock pattern (like MyTasks.stories.ts)
- Add stories: WithTasks, Empty, ApiError, Loading, Sorting

Assisted-by: multi-agent-shogun-aki-tweak
@sousuke0422 sousuke0422 marked this pull request as draft June 30, 2026 09:04
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Coverage Report for apps/frontend

Status Category Percentage Covered / Total
🟢 Lines 97.34% 110 / 113
🟢 Statements 95.96% 119 / 124
🟢 Functions 95.55% 43 / 45
🟢 Branches 88.88% 48 / 54
File CoverageNo changed files found.
Generated in workflow #601 for commit 87d2760 by the Vitest Coverage Report Action

@chromatic-com

chromatic-com Bot commented Jun 30, 2026

Copy link
Copy Markdown

Important

UI Tests need review – Review now

🟡 UI Tests: 5 changes must be accepted as baselines
🟡 UI Review: Go review the new and updated UI
Storybook icon Storybook Publish: 24 stories published

@github-actions

Copy link
Copy Markdown

コードを確認しました。以下の指摘があります。

High

console.log が本番コードに残存している

+Page.vue:189console.log があります。バックエンド拡充時の参照用とのことですが、本番コードにデバッグ用のログを残すべきではありません。削除するか、開発環境でのみ出力するようにしてください。

console.log({ task_id: r.taskId, assignee_user_ids: r.assignees.map((a) => a.user_id) });

Medium

as any による型安全性の回避

+Page.vue:126as any を使用して型エラーを回避しています。コメントに「generated type が query パラメータを path に誤分類しているため」とありますが、型定義の問題は型定義側で修正すべきです。as any を残すと、将来的にパラメータの変更があってもコンパイルエラーで検知できなくなります。

Low

  • Empty ストーリーで mockFetch() の戻り値 restore を返していますが、直後に globalThis.fetch を再上書きしているため、restore で元に戻るのは最後の上書きのみになります
  • isInitialLoadingisFetching を使用していますが、再フェッチ時にも true になります。初回ローディングのみを示すには isLoading の方が適切かもしれません

New%20session%20-%202026-06-30T09%3A04%3A01.652Z
opencode session  |  github run

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploying koyori with  Cloudflare Pages  Cloudflare Pages

Latest commit: 87d2760
Status: ✅  Deploy successful!
Preview URL: https://b4b2f26c.koyori.pages.dev
Branch Preview URL: https://feat-task-table-real-api.koyori.pages.dev

View logs

…, chromatic baseline)

- [medium] remove as any cast for list_tasks params by using regenerated openapi types and adding non-null assertions for projectId
- [low] refactor Empty story to self-contained fetch mock (no mockFetch dependency)
- [low] change isInitialLoading from isFetching to isLoading, add rationale comment
- [cmd_394] rename WithTasks export to Default for Chromatic baseline restoration

Assisted-by: multi-agent-shogun-aki-tweak
… task table

- TaskRow.assignee_user_ids: string[] for multi-assignee support
- Overlapping avatars with ring-2 ring-background (OriginUI comp-409 style)
- +M overflow chip for avatars exceeding display limit (default 3)
- "先頭名 他N名" text label for 2+ assignees
- Storybook: add task-6 with 5 assignees for overflow test coverage

Assisted-by: multi-agent-shogun-aki-tweak
…e cell

- Create reusable AvatarGroup.vue component (comp-409 +N chip + comp-412 compact size)
- Props: userIds, maxDisplay (default 3)
- Replace inline h() implementation in TaskTable assignee column
- Size: 28px (size-7) with ring-2 ring-background overlap effect
- Keep "先頭名 他N名" text per lord instruction
- Keep TODO comment for future user name resolution API

Assisted-by: multi-agent-shogun-aki-tweak
Root cause: both task-1 (3 users, maxDisplay=3) and task-6 (5 users, maxDisplay=3) showed +2 text due to fallback logic, causing Chromatic findByText to match multiple elements.

Fix 1: AvatarGroup.vue - show overflow text only when remaining > 0
Fix 2: TaskTable.stories.ts - update play function comment to reference task-6
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