151 lines
3.5 KiB
YAML
151 lines
3.5 KiB
YAML
task_id: task_create_page_album_detail
|
|
entity_id: page_album_detail
|
|
generated_at: '2025-12-18T15:16:50.297890'
|
|
workflow_version: v001
|
|
target:
|
|
type: page
|
|
definition:
|
|
id: page_album_detail
|
|
path: /album/:id
|
|
title: Album
|
|
description: Album detail with track list
|
|
data_needs:
|
|
- api_id: api_get_album
|
|
purpose: Album details and songs
|
|
on_load: true
|
|
components:
|
|
- component_album_header
|
|
- component_track_list
|
|
- component_song_card
|
|
auth:
|
|
required: false
|
|
related:
|
|
models: []
|
|
apis:
|
|
- id: api_get_album
|
|
definition: &id003
|
|
id: api_get_album
|
|
method: GET
|
|
path: /api/albums/:id
|
|
description: Get album details with songs
|
|
responses:
|
|
- status: 200
|
|
description: Album details
|
|
schema:
|
|
id: uuid
|
|
title: string
|
|
description: string
|
|
cover_art_url: string
|
|
release_date: string
|
|
artist:
|
|
id: uuid
|
|
stage_name: string
|
|
songs:
|
|
- id: uuid
|
|
title: string
|
|
duration: integer
|
|
track_number: integer
|
|
auth:
|
|
required: false
|
|
depends_on_models:
|
|
- model_album
|
|
- model_song
|
|
- model_artist
|
|
components:
|
|
- id: component_track_list
|
|
definition: &id001
|
|
id: component_track_list
|
|
name: TrackList
|
|
description: List of songs with track numbers
|
|
props:
|
|
- name: songs
|
|
type: array[Song]
|
|
required: true
|
|
- name: showTrackNumber
|
|
type: boolean
|
|
default: true
|
|
- name: reorderable
|
|
type: boolean
|
|
default: false
|
|
events:
|
|
- name: onPlay
|
|
payload:
|
|
songId: string
|
|
- name: onReorder
|
|
payload:
|
|
songIds: array[string]
|
|
uses_apis: []
|
|
uses_components:
|
|
- component_song_card
|
|
- id: component_song_card
|
|
definition: &id002
|
|
id: component_song_card
|
|
name: SongCard
|
|
description: Song display card with play button
|
|
props:
|
|
- name: song
|
|
type: Song
|
|
required: true
|
|
- name: showArtist
|
|
type: boolean
|
|
default: true
|
|
- name: showAlbum
|
|
type: boolean
|
|
default: false
|
|
events:
|
|
- name: onPlay
|
|
payload:
|
|
songId: string
|
|
- name: onAddToPlaylist
|
|
payload:
|
|
songId: string
|
|
uses_apis: []
|
|
uses_components: []
|
|
- id: component_album_header
|
|
definition: &id004
|
|
id: component_album_header
|
|
name: AlbumHeader
|
|
description: Album detail header with cover art
|
|
props:
|
|
- name: album
|
|
type: Album
|
|
required: true
|
|
- name: artist
|
|
type: Artist
|
|
required: true
|
|
events:
|
|
- name: onPlayAll
|
|
payload: null
|
|
uses_apis: []
|
|
uses_components: []
|
|
dependencies:
|
|
entity_ids:
|
|
- component_track_list
|
|
- component_song_card
|
|
- api_get_album
|
|
- component_album_header
|
|
definitions:
|
|
- id: component_track_list
|
|
type: component
|
|
definition: *id001
|
|
- id: component_song_card
|
|
type: component
|
|
definition: *id002
|
|
- id: api_get_album
|
|
type: api
|
|
definition: *id003
|
|
- id: component_album_header
|
|
type: component
|
|
definition: *id004
|
|
files:
|
|
to_create:
|
|
- app/album/:id/page.tsx
|
|
reference: []
|
|
acceptance:
|
|
- criterion: Page renders at /album/:id
|
|
verification: Navigate to /album/:id
|
|
- criterion: Data fetching works
|
|
verification: Check network tab
|
|
- criterion: Components render correctly
|
|
verification: Visual inspection
|