Skip to content

edit button moved#60

Merged
aki91-g merged 1 commit intomainfrom
mvp/issue58
Mar 18, 2026
Merged

edit button moved#60
aki91-g merged 1 commit intomainfrom
mvp/issue58

Conversation

@aki91-g
Copy link
Copy Markdown
Owner

@aki91-g aki91-g commented Mar 18, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a new Tasks view mode for browsing and selecting tasks from an interactive list
    • Enhanced task editing workflow with improved navigation—users can now return to their previous view after completing edits
    • Tasks are now selectable directly from the task list for streamlined navigation

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

This PR introduces a new 'tasks' mode to the TaskDrawer component, extending the DrawerMode type union. TaskList now emits select-item events when users click task rows. The drawer supports mode transitions including View↔Edit, View↔Tasks, and Create→View. MainDashboard's openDrawer function and drawerMode type are updated to accommodate the new mode.

Changes

Cohort / File(s) Summary
TaskDrawer mode expansion
src/components/TaskDrawer.vue, src/views/MainDashboard.vue
DrawerMode type expanded to include 'tasks'. TaskDrawer introduces previousMode tracking for non-edit states, adds helper functions (startEdit/cancelEdit/handleTaskListSelect) for managing transitions, and updates UI with Edit button in view mode, Tasks mode display, and TaskList integration. MainDashboard's openDrawer signature and drawerMode type updated to support 'tasks' mode.
TaskList interactivity
src/components/TaskList.vue
Item rows converted from non-interactive divs to button elements. New defineEmits declaration exposes select-item event with Item payload, wired to button clicks for task selection.
Documentation
ARCHITECTURE.md
Architecture documentation updated to reflect new TaskDrawer modes, DrawerMode type changes, and select-item emission in TaskList.

Sequence Diagram

sequenceDiagram
    participant User
    participant MainDashboard
    participant TaskDrawer
    participant TaskList

    User->>MainDashboard: Click Tasks button
    MainDashboard->>TaskDrawer: Set mode='tasks'
    TaskDrawer->>TaskList: Render task list
    User->>TaskList: Click task item
    TaskList->>TaskDrawer: Emit select-item(item)
    TaskDrawer->>TaskDrawer: handleTaskListSelect()
    TaskDrawer->>TaskDrawer: Set mode='view', select item
    TaskDrawer->>User: Display selected task details
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • feat: edit/archive/delete button #57: Modifies the same three frontend components (TaskDrawer.vue, TaskList.vue, MainDashboard.vue) to implement the 'tasks' mode feature and related state management.

Poem

🐰 A new task mode hops into view,
With buttons that lead where tasks are due,
EditMode dances, previousMode glows,
The drawer transitions wherever it goes! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'edit button moved' is only partially related to the changeset. While the edit button location does change, the primary changes involve adding a new 'tasks' mode with significant UI and state management refactoring across multiple components. Consider a more comprehensive title that captures the main objective, such as 'Add tasks mode to TaskDrawer with edit flow refactoring' or 'Implement task selection mode in drawer component'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mvp/issue58
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.

Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/frontend/src/components/TaskList.vue (1)

21-47: ⚠️ Potential issue | 🟡 Minor

Invalid HTML: <div> elements nested inside <button>.

Per HTML spec, <button> elements can only contain phrasing content, but this template nests <div> elements (.task-info and .task-meta) inside the button. This can cause inconsistent behavior across browsers and screen readers.

Consider changing the inner <div> elements to <span> with appropriate display styles, or use a clickable <div role="button" tabindex="0"> with keyboard event handling instead.

♻️ Proposed fix using span elements
       <button
         v-for="item in items"
         :key="item.id"
         type="button"
         class="task-row hover:bg-slate-100 transition-colors cursor-pointer"
         `@click`="emit('select-item', item)"
       >
         <SyncStatusBadge
           :sync-status="item.sync_status"
           :event-status="syncMap[item.id]"
           :error-message="errorMap[item.id]"
           :is-syncing="isSyncing"
         />

         <span :class="['status-pill', item.status.toLowerCase()]">
           {{ item.status }}
         </span>

-        <div class="task-info">
+        <span class="task-info">
           <strong>{{ item.title }}</strong>
           <p v-if="item.description">{{ item.description }}</p>
-        </div>
+        </span>

-        <div class="task-meta">
+        <span class="task-meta">
           <span class="motivation">🔥 {{ item.motivation }}</span>
-        </div>
+        </span>
       </button>

Then update the CSS to add display: block or display: flex to .task-info and .task-meta as needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/frontend/src/components/TaskList.vue` around lines 21 - 47, The template
nests <div> elements inside the clickable <button> in the v-for (the button that
emits 'select-item'), which is invalid HTML; update the inner containers
(.task-info and .task-meta) to be <span> elements (or other phrasing content)
and adjust their CSS to display:block or display:flex so layout is preserved,
ensuring SyncStatusBadge and the status-pill remain unchanged, or alternatively
replace the outer <button> with a <div role="button" tabindex="0"> and add
keydown handlers to call the same emit('select-item', item) to preserve
accessibility and keyboard interaction.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/frontend/src/components/TaskList.vue`:
- Around line 21-47: The template nests <div> elements inside the clickable
<button> in the v-for (the button that emits 'select-item'), which is invalid
HTML; update the inner containers (.task-info and .task-meta) to be <span>
elements (or other phrasing content) and adjust their CSS to display:block or
display:flex so layout is preserved, ensuring SyncStatusBadge and the
status-pill remain unchanged, or alternatively replace the outer <button> with a
<div role="button" tabindex="0"> and add keydown handlers to call the same
emit('select-item', item) to preserve accessibility and keyboard interaction.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8dde9f31-e325-460a-b8bf-ce3c6f9d829d

📥 Commits

Reviewing files that changed from the base of the PR and between f53adcf and 7bb58ad.

📒 Files selected for processing (4)
  • apps/frontend/ARCHITECTURE.md
  • apps/frontend/src/components/TaskDrawer.vue
  • apps/frontend/src/components/TaskList.vue
  • apps/frontend/src/views/MainDashboard.vue

@aki91-g aki91-g merged commit d0bc9f4 into main Mar 18, 2026
3 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Mar 23, 2026
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