Skip to content

feat: task page#228

Merged
hmbanan666 merged 1 commit into
mainfrom
task-page
Oct 17, 2025
Merged

feat: task page#228
hmbanan666 merged 1 commit into
mainfrom
task-page

Conversation

@hmbanan666

@hmbanan666 hmbanan666 commented Oct 17, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added detailed task view page for viewing individual task information.
    • Made task cards clickable for easy navigation to task details.
    • Added completed state display with completion date.
    • Added focused task indicator in task cards.
  • UI/UX Improvements

    • Enhanced staff member list with horizontal scrolling.
    • Increased avatar border thickness for better visibility.
    • Added smooth slide animations to several pages.
    • Updated task navigation routing and labels.

@hmbanan666 hmbanan666 self-assigned this Oct 17, 2025
@coderabbitai

coderabbitai Bot commented Oct 17, 2025

Copy link
Copy Markdown

Walkthrough

Updates task navigation routes and creates a new task detail page. Refactors TaskInfoCard with completion and focus state indicators. Enhances StaffBlock with horizontal scrolling layout and increased avatar borders. Adds motion preset animations to multiple page transitions. Updates navigation labels and routes.

Changes

Cohort / File(s) Summary
Task Navigation & Routing
apps/atrium-telegram/app/composables/useNavigation.ts, apps/atrium-telegram/app/pages/navigation.vue, apps/atrium-telegram/app/pages/task/my.vue, apps/atrium-telegram/app/pages/task/all.vue
Route path changed from /tasks to /task/my with updated name to my-tasks. Navigation item "Задачи" now points to /task/all with updated icon. Task list page now wraps TaskInfoCard in NuxtLink for navigation to individual task pages. Added page metadata for my-tasks route.
Task Detail Page
apps/atrium-telegram/app/pages/task/[taskId]/index.vue
New page displaying task information including performer avatar, status indicators (completed with date or loading spinner), focus state label, task name, description, report, date fields, and associated list name. Computes completion and focus states based on task data.
Component Enhancements
apps/atrium-telegram/app/components/StaffBlock.vue, apps/atrium-telegram/app/components/TaskInfoCard.vue
StaffBlock outer container gains overflow-x-auto and relative positioning; inner layout switches to fixed horizontal row with gap-3. Avatar border increased from border-2 to border-3. TaskInfoCard now renders conditional UI for completed state (check icon + date), focus state label, and simplified loader icon; removed motion preset from ActiveCard root.
Page Motion Animations
apps/atrium-telegram/app/pages/agreement/[agreementId]/index.vue, apps/atrium-telegram/app/pages/flow/[itemId]/index.vue, apps/atrium-telegram/app/pages/partner/[partnerId]/index.vue, apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue
Added motion-preset-slide-left class to Section components for entrance animations across multiple detail pages.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TaskList as task/all.vue
    participant TaskDetail as task/[taskId]/index.vue
    participant Store as Task Store

    User->>TaskList: View all tasks
    TaskList->>Store: Fetch tasks
    Store-->>TaskList: Return tasks
    
    rect rgb(240, 248, 255)
    Note over TaskList: Each task wrapped in<br/>NuxtLink to /task/{id}
    User->>TaskDetail: Click task
    end

    TaskDetail->>Store: Get task by ID
    Store-->>TaskDetail: Return task
    
    rect rgb(240, 248, 255)
    Note over TaskDetail: Compute states &<br/>render completed/focus UI
    alt Task completed
        TaskDetail->>TaskDetail: Show check + date
    else Task in progress
        TaskDetail->>TaskDetail: Show loader
    end
    
    alt Task focused
        TaskDetail->>TaskDetail: Show focus label
    end
    end
    
    TaskDetail-->>User: Display task details
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

The PR involves multiple cohesive changes across components and pages with moderate logic complexity. TaskInfoCard state logic and the new task detail page require careful review, while motion animation additions and route changes are straightforward. Changes span multiple files but follow consistent patterns (animations) and UI updates, creating moderate heterogeneity.

Possibly related PRs

  • chore: navigation rework #152: Updates task routes in useNavigation.ts similarly, modifying mainRoutes entries and names structure.
  • feat: confetti on task complete #227: Modifies TaskInfoCard.vue motion preset behavior on the ActiveCard component, directly overlapping with this PR's TaskInfoCard changes.
  • chore: visual rework #112: Updates ActiveCard.vue styling for active states, affecting visual behavior of components used throughout the app including TaskInfoCard.

Poem

🐰 Hops through tasks with focus bright,
New details page in scrolling sight!
Animations dance, left they glide,
Route paths changed with graceful stride!
Lists and cards in harmony bound,

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: task page" is directly related to the primary changes in the changeset. The most significant addition is the new task detail page at apps/atrium-telegram/app/pages/task/[taskId]/index.vue, along with related updates to task-related pages (my.vue and all.vue), routing configuration, and the TaskInfoCard component. While the title is somewhat generic and doesn't capture the full scope of changes (including component refactoring, navigation updates, and animation additions across multiple pages), it accurately reflects a substantial and central aspect of the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch task-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
apps/atrium-telegram/app/components/TaskInfoCard.vue (1)

7-30: Code duplication flagged in task detail page.

These completed and focused state UI blocks are duplicated in apps/atrium-telegram/app/pages/task/[taskId]/index.vue (lines 7-30). See the detailed refactoring suggestion in that file's review.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11b48d1 and b7251ca.

📒 Files selected for processing (11)
  • apps/atrium-telegram/app/components/StaffBlock.vue (2 hunks)
  • apps/atrium-telegram/app/components/TaskInfoCard.vue (2 hunks)
  • apps/atrium-telegram/app/composables/useNavigation.ts (1 hunks)
  • apps/atrium-telegram/app/pages/agreement/[agreementId]/index.vue (1 hunks)
  • apps/atrium-telegram/app/pages/flow/[itemId]/index.vue (1 hunks)
  • apps/atrium-telegram/app/pages/navigation.vue (1 hunks)
  • apps/atrium-telegram/app/pages/partner/[partnerId]/index.vue (1 hunks)
  • apps/atrium-telegram/app/pages/task/[taskId]/index.vue (1 hunks)
  • apps/atrium-telegram/app/pages/task/all.vue (1 hunks)
  • apps/atrium-telegram/app/pages/task/my.vue (1 hunks)
  • apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (13)
apps/atrium-telegram/app/pages/ticket/[ticketId]/index.vue (1)

3-3: LGTM! Consistent animation pattern applied.

The addition of the motion-preset-slide-left class provides a consistent entrance animation, aligning with similar updates across other pages in this PR.

apps/atrium-telegram/app/pages/agreement/[agreementId]/index.vue (1)

3-3: LGTM! Animation enhancement applied.

The motion class addition is consistent with the PR's objective of adding entrance animations to page transitions.

apps/atrium-telegram/app/pages/partner/[partnerId]/index.vue (1)

3-3: LGTM! Entrance animation added.

Consistent with the animation pattern applied throughout this PR.

apps/atrium-telegram/app/pages/flow/[itemId]/index.vue (1)

3-3: LGTM! Animation class applied consistently.

The motion preset enhancement aligns with the broader UI animation improvements in this PR.

apps/atrium-telegram/app/components/StaffBlock.vue (2)

2-3: Good UX improvement with horizontal scrolling layout.

The refactor from a wrapping layout to horizontal scrolling provides a better user experience for displaying staff members. The snap points and overflow management create smooth, mobile-friendly scrolling behavior.


13-13: Avatar border enhancement improves visual hierarchy.

Increasing the border thickness from border-2 to border-3 makes online status more prominent and improves avatar visibility in the horizontal scroll layout.

apps/atrium-telegram/app/pages/task/my.vue (1)

63-65: LGTM! Page metadata properly configured.

The page metadata name my-tasks correctly aligns with the route name defined in apps/atrium-telegram/app/composables/useNavigation.ts, ensuring proper navigation matching.

apps/atrium-telegram/app/pages/navigation.vue (1)

61-62: Navigation item update is correct and verified.

The route change to /task/all and icon update to i-lucide-list-todo appropriately distinguish the "all tasks" view from the "my tasks" view. The corresponding /task/all page exists at apps/atrium-telegram/app/pages/task/all.vue.

apps/atrium-telegram/app/composables/useNavigation.ts (1)

20-21: Route restructuring verified - old /tasks route has been successfully removed.

The old /tasks route is completely gone from the codebase:

  • No pages/tasks/ directory exists
  • New task routes properly configured at /task/my, /task/all, and /task/[taskId]
  • Route name my-tasks matches page metadata
  • No old route references remain in atrium-telegram

Note: No redirect rule configured from /tasks to /task/my. Users with bookmarked old URLs will encounter 404s rather than redirects—confirm this aligns with your versioning strategy.

apps/atrium-telegram/app/pages/task/all.vue (1)

60-67: LGTM! Navigation implementation is clean and correct.

The NuxtLink wrapper properly enables navigation to individual task detail pages while maintaining the card display. The route structure aligns with the new task detail page at /task/[taskId].

apps/atrium-telegram/app/pages/task/[taskId]/index.vue (1)

102-102: Consider error handling for missing tasks.

If taskId doesn't match any task in the store, the page will render with mostly empty sections. Consider adding explicit handling for this case.

Suggestions:

  1. Redirect to task list if task not found
  2. Display a user-friendly error message
  3. Show a loading state while the task store is being populated
// Example approach
const task = computed(() => taskStore.tasks.find((t) => t.id === params.taskId))

// In template or with a watcher
watchEffect(() => {
  if (!task.value && taskStore.tasks.length > 0) {
    navigateTo('/task/my')
  }
})
apps/atrium-telegram/app/components/TaskInfoCard.vue (2)

7-20: Completed state logic is correct.

The conditional rendering properly shows either the completion state (with check icon and timestamp) or the loading spinner based on isCompleted. The use of optional chaining for task.completedAt is appropriate.


22-30: Focused state implementation looks good.

The isFocused computed property correctly checks if the current task matches the performer's focused task, and the UI appropriately highlights this state with the goal icon and label.

Also applies to: 65-65

Comment on lines +7 to +30
<div v-if="isCompleted" class="flex flex-row gap-1 items-center text-primary">
<UIcon
name="i-lucide-check"
class="shrink-0 size-8 text-primary"
/>
<p v-if="task?.completedAt" class="text-base/5 font-semibold">
{{ format(new Date(task.completedAt), 'd MMMM yyyy в HH:mm', { locale: ru }) }}
</p>
</div>
<UIcon
v-else
name="i-lucide-loader-circle"
class="shrink-0 size-8 text-muted/50 motion-preset-spin motion-duration-4000"
/>

<div v-if="isFocused" class="flex flex-row items-center gap-1.5 text-primary">
<UIcon
name="i-lucide-goal"
class="shrink-0 size-8 motion-preset-seesaw"
/>
<p class="max-w-22 text-sm/4 font-bold">
В Фокусе
</p>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Significant code duplication with TaskInfoCard.vue.

The completed state UI (lines 7-15) and focused state UI (lines 22-30) are duplicated verbatim from TaskInfoCard.vue. This duplication extends to the date formatting logic and icon configuration.

Consider extracting these state indicator blocks into a reusable component (e.g., TaskStatusIndicators.vue) that both the card and detail page can use.

Example refactor:

<!-- TaskStatusIndicators.vue -->
<template>
  <div class="flex flex-row gap-2 items-center">
    <UAvatar :src="performer?.avatarUrl ?? undefined" class="size-8" />

    <div v-if="isCompleted" class="flex flex-row gap-1 items-center text-primary">
      <UIcon name="i-lucide-check" class="shrink-0 size-8 text-primary" />
      <p v-if="completedAt" class="text-base/5 font-semibold">
        {{ format(new Date(completedAt), 'd MMMM yyyy в HH:mm', { locale: ru }) }}
      </p>
    </div>
    <UIcon
      v-else
      name="i-lucide-loader-circle"
      class="shrink-0 size-8 text-muted/50 motion-preset-spin motion-duration-4000"
    />

    <div v-if="isFocused" class="flex flex-row items-center gap-1.5 text-primary">
      <UIcon name="i-lucide-goal" class="shrink-0 size-8 motion-preset-seesaw" />
      <p class="max-w-22 text-sm/4 font-bold">В Фокусе</p>
    </div>
  </div>
</template>

Then use it in both files:

<TaskStatusIndicators 
  :performer="performer"
  :is-completed="isCompleted"
  :completed-at="task?.completedAt"
  :is-focused="isFocused"
/>

@hmbanan666 hmbanan666 merged commit 37b7167 into main Oct 17, 2025
8 checks passed
@hmbanan666 hmbanan666 deleted the task-page branch October 17, 2025 08:50
This was referenced Oct 17, 2025
This was referenced Oct 27, 2025
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