|
Download screenshot42-taskmanager-projectdetail/instruction.md from ApolloTeam/fullstackbench-tasks: direct link, hf CLI and curl.
- Browser
- Download file 4.62 kB
-
https://huggingface.co/datasets/ApolloTeam/fullstackbench-tasks/resolve/main/screenshot42-taskmanager-projectdetail/instruction.md
- Command line
-
hf download hf://datasets/ApolloTeam/fullstackbench-tasks/screenshot42-taskmanager-projectdetail/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/ApolloTeam/fullstackbench-tasks/resolve/main/screenshot42-taskmanager-projectdetail/instruction.md
4.62 kB
Implement the missing Project detail (Kanban) page
The TaskFlow React + Flask app at /app/ is missing the /projects/:id route. A reference screenshot of the desired page (rendered for project 1 "Apollo" with 4 tasks across 3 columns) is at /app/reference.png (1280×900).
Your task
- Create
/app/frontend/src/components/ProjectDetail.jsximplementing the page shown. - Edit
/app/frontend/src/App.jsx— addimport ProjectDetail from './components/ProjectDetail';near the other component imports, and add<Route path="/projects/:id" element={<ProjectDetail />} />inside the<Routes>block.
Context
- The route uses
useParams()to readidfrom the URL. - API helpers in
/app/frontend/src/api.js:getProjectDetail(id)→{id, name, description, archived, members: [{id, name, role}]}getProjectStats(id)→{total_tasks, completion_rate, by_status: {todo, in_progress, done}, overdue_count}getProjectActivities(id)→[{id, action, user_name, task_title, field, old_value, new_value, created_at}, ...]getProjectTasks(id, filters = {})→ array of task objects; filters object is passed as query params (status, priority, assigned_to, tag)updateTask(taskId, data)→ PUT/api/tasks/<id>deleteTask(taskId)→ DELETE/api/tasks/<id>(usesconfirm()to gate)updateProject(id, data)→ PUT/api/projects/<id>(used by Archive button)getTags()→ tag list for the filter
- Sibling components for styling:
Dashboard.jsx,AddTask.jsx,TaskDetail.jsx. CSS inApp.css— use only existing classes (sample relevant ones):back-link,error-msg,project-header,project-header-actions,archived-badge,btn,btn-primary,btn-secondary,btn-danger,btn-sm,stats-bar,stat-item,stat-value,stat-label,stat-overdue,members-bar,member-chip,user-avatar,role-badge,filter-bar,filter-select,card,card-header,activity-feed,activity-item,activity-dot,activity-content,activity-text,activity-time,kanban-board,kanban-column,kanban-column-title,kanban-column-count,kanban-card,kanban-card-title,kanban-card-tags,tag-badge-sm,kanban-card-meta,priority-badge,status-select,loading.
Layout
- Back link at top:
<Link to="/" className="back-link">← Back to Dashboard</Link>. - Header row (
project-header):<h1>{project.name}</h1>(with optionalarchived-badge) + optional description; on the right (project-header-actions):+ Add Tasklink to/projects/<id>/add-task,Archive/Unarchivebutton (toggles viaupdateProject),Activity/Hide Activitybutton (togglesshowActivity). - Stats bar (
stats-bar): 4stat-itemcards — Total Tasks, Complete (formatted as<n>%), In Progress (fromby_status.in_progress), Overdue (withstat-overduevalue class). - Members bar (
members-bar): onemember-chipper project member; chip showsuser-avatar(uppercase first letter) + name + optionalrole-badge"admin" if role='admin'. - Filter bar (
filter-bar): fourfilter-selects — Status (All Statuses / To Do / In Progress / Done), Priority (All Priorities / High / Medium / Low), Members (All Members / one per project member), Tags (All Tags / one per tag fromgetTags). When any filter is non-empty, show a Clear Filters button. Changing any filter callsgetProjectTasks(id, filters)and replaces the visible task list (filter is server-side, not client-side filter on a cached list). - Activity sidebar (only when
showActivitytrue): a card showing activity feed entries with relative timestamps (just now / Nm ago / Nh ago / Nd ago). - Kanban board (
kanban-board): three columns —To Do,In Progress,Done. Each column header has the column name + akanban-column-countshowing the number of tasks in that column. Tasks are bucketed by theirstatusfield. - Each task card (
kanban-card) contains: title (linked to/tasks/<id>), optional tags (tag-badge-smstyled with backgroundColort.color + '22', colort.color), priority badge (priority-badge <task.priority>), assignee or "Unassigned", optional due date, optional comment count, and bottom row with a status<select className="status-select">(To Do / In Progress / Done) + a Delete button. Changing the status-select callsupdateTask(taskId, {status: newValue})then reloads data; clicking Delete usesconfirm()thendeleteTask(taskId)then reloads.
Dependencies are pre-installed. Do not start any servers — the verifier handles that.