[MM-69381] Add check/uncheck chip to playbook checklist items - #9959
[MM-69381] Add check/uncheck chip to playbook checklist items#9959vish9812 wants to merge 5 commits into
Conversation
Documentation Impact Analysis — updates neededDocumentation Impact AnalysisOverall Assessment: Documentation Updates Recommended Changes SummaryThis PR adds a task activity indicator feature to Playbook checklist items on mobile: a new chip and bottom-sheet detail section that display who last checked or unchecked a task item and when. It also bumps the server database schema from version 20 to 21 (adds a Documentation Impact Details
Recommended Actions
ConfidenceMedium — The feature is clearly new and user-visible (new chip and bottom-sheet section), and the existing
|
Coverage Comparison Report |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change persists playbook-run timeline events, derives checklist task activity from matching events, propagates activity through checklist components, and renders localized chip and detail indicators with timezone and military-time support. It also adds narrow friendly-date formatting and updates related schemas, tests, documentation, and CI settings. ChangesPlaybook run activity
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PlaybookRun
participant ChecklistList
participant ChecklistItem
participant getTaskActivity
participant TaskActivityIndicator
PlaybookRun->>ChecklistList: timelineEvents
ChecklistList->>ChecklistItem: timelineEvents
ChecklistItem->>getTaskActivity: checklist item and timelineEvents
getTaskActivity-->>ChecklistItem: activity and actorUserId
ChecklistItem->>TaskActivityIndicator: activity, actor, timezone, display settings
TaskActivityIndicator-->>ChecklistItem: chip or detail activity UI
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
app/database/migration/server/index.test.ts (1)
9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winApply the required test naming convention consistently.
app/database/migration/server/index.test.ts#L9-L9: rename the case to start withshould.app/products/playbooks/database/models/playbook_run.test.ts#L28-L45: rename both cases to start withshould; use object cases and$labelto avoid the unused callback parameter.As per coding guidelines, tests should use
it('should...')naming and unused parameters must be removed completely.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/database/migration/server/index.test.ts` at line 9, Rename the test in app/database/migration/server/index.test.ts:9 to start with “should”. In app/products/playbooks/database/models/playbook_run.test.ts:28-45, rename both cases to start with “should”, convert their cases to objects using $label for descriptions, and remove the unused callback parameter.Source: Coding guidelines
app/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity.test.ts (1)
37-102: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTest titles don't follow the
it('should...')convention.None of the titles in this file (e.g., Line 37, Line 55, Line 86) start with "should". As per path instructions,
app/**/*.test.tsguideline states: "Tests should use it('should...') naming, not test('happy path')."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity.test.ts` around lines 37 - 102, Rename every test title in the checklist activity suite to follow the it('should...') convention, including the parameterized tests and collision cases. Preserve each test’s existing meaning and assertions while prefixing titles with clear “should” wording.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/products/playbooks/database/models/playbook_run.ts`:
- Around line 39-43: Update the TimelineEvent type guard around the event
validation to verify every required TimelineEvent property, including id,
creator_user_id, and playbook_run_id, alongside the existing checks before
narrowing the value. Ensure only objects satisfying the complete TimelineEvent
contract are returned as valid, or narrow the guard’s declared type if those
fields are not required.
In
`@app/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity_indicator.tsx`:
- Around line 119-176: The outer accessible View in the chip and detail-row
branches currently wraps tappable BaseChip or PressableOpacity content. Remove
that accessibility container behavior, place the accessibility label on the
non-interactive content, and assign the tappable chip/avatar its own appropriate
accessibility role and label while preserving the existing press handlers.
---
Nitpick comments:
In `@app/database/migration/server/index.test.ts`:
- Line 9: Rename the test in app/database/migration/server/index.test.ts:9 to
start with “should”. In
app/products/playbooks/database/models/playbook_run.test.ts:28-45, rename both
cases to start with “should”, convert their cases to objects using $label for
descriptions, and remove the unused callback parameter.
In
`@app/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity.test.ts`:
- Around line 37-102: Rename every test title in the checklist activity suite to
follow the it('should...') convention, including the parameterized tests and
collision cases. Preserve each test’s existing meaning and assertions while
prefixing titles with clear “should” wording.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7e6b35a8-eaa9-47d0-b736-4e46a3ab092f
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (33)
app/components/friendly_date/friendly_date.test.tsxapp/components/friendly_date/index.tsxapp/database/migration/server/index.test.tsapp/database/migration/server/index.tsapp/database/schema/server/index.tsapp/database/schema/server/test.tsapp/products/playbooks/database/models/playbook_run.test.tsapp/products/playbooks/database/models/playbook_run.tsapp/products/playbooks/database/operators/transformers/index.test.tsapp/products/playbooks/database/operators/transformers/index.tsapp/products/playbooks/database/schema/playbook_run.tsapp/products/playbooks/screens/playbook_run/checklist/checklist.test.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/checklist_item.test.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/checklist_item.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/checklist_item_bottom_sheet/checklist_item_bottom_sheet.test.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/checklist_item_bottom_sheet/checklist_item_bottom_sheet.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/checklist_item_bottom_sheet/index.test.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/checklist_item_bottom_sheet/index.tsapp/products/playbooks/screens/playbook_run/checklist/checklist_item/index.test.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/index.tsapp/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity.test.tsapp/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity.tsapp/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity_indicator.test.tsxapp/products/playbooks/screens/playbook_run/checklist/checklist_item/task_activity_indicator.tsxapp/products/playbooks/screens/playbook_run/checklist/index.test.tsxapp/products/playbooks/screens/playbook_run/checklist_list.test.tsxapp/products/playbooks/screens/playbook_run/checklist_list.tsxapp/products/playbooks/screens/playbook_run/playbook_run.test.tsxapp/products/playbooks/screens/playbook_run/playbook_run.tsxapp/products/playbooks/types/api.d.tsapp/products/playbooks/types/database/models/playbook_run.tstest/test_helper.ts
|
Does clicking on that chip open the bottom sheet @vish9812 ? |
|
@asaadmahmood clicking on both chips open the regular profile bottom sheet. Clicking on the task opens the "task" bottom sheet you see. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.ruby-version:
- Line 1: Update the Ruby version declared in .ruby-version from the EOL 3.2
series to a supported release, using Ruby 3.4 or newer. If retaining Ruby 3.2 is
required, document the exception instead.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
62d1ad7 to
b451c98
Compare
|
@asaadmahmood isn't that double chip confusing? Especially when there is an assignee and a different person checks on it. Given the space in the mobile app, shouldn't that info be accessed through the bottom sheet? i like how it looks in it and I don't see a lot of value in it being in the checklist view |
|
❌ E2E Test Setup Failed Failed to trigger E2E workflow: failed to trigger mobile e2e workflow: POST https://api.github.com/repos/mattermost/mattermost-mobile/actions/workflows/e2e-detox-pr.yml/dispatches: 422 Unexpected inputs provided: ["ANDROID_SITE_1_URL", "ANDROID_SITE_2_URL", "IOS_SITE_1_URL", "IOS_SITE_2_URL"] [] |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 209: Update the test:ci script in package.json to remove the
--workerIdleMemoryLimit=1GB CLI argument while preserving --maxWorkers=2 and the
other existing options. Configure workerIdleMemoryLimit through the project’s
Jest configuration instead.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
29e76ef to
b451c98
Compare
|
❌ E2E Test Setup Failed Failed to trigger E2E workflow: failed to trigger mobile e2e workflow: POST https://api.github.com/repos/mattermost/mattermost-mobile/actions/workflows/e2e-detox-pr.yml/dispatches: 422 Unexpected inputs provided: ["ANDROID_SITE_1_URL", "ANDROID_SITE_2_URL", "IOS_SITE_1_URL", "IOS_SITE_2_URL"] [] |
|
❌ E2E Test Setup Failed Failed to create E2E test instances: installation wait cancelled: context canceled |
39eb65e to
b451c98
Compare
|
❌ E2E Test Setup Failed Failed to trigger E2E workflow: failed to trigger mobile e2e workflow: POST https://api.github.com/repos/mattermost/mattermost-mobile/actions/workflows/e2e-detox-pr.yml/dispatches: 422 Unexpected inputs provided: ["ANDROID_SITE_1_URL", "ANDROID_SITE_2_URL", "IOS_SITE_1_URL", "IOS_SITE_2_URL"] [] |
…cklist item bottom sheet
…ents Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b451c98 to
2c1c822
Compare
Summary
Adds task activity support to playbook run checklist items:
task_activitymodel/schema field onPlaybookRun).Ticket Link
JIRA - https://mattermost.atlassian.net/browse/MM-69381
Related Web PR - mattermost/mattermost-plugin-playbooks#2307
Checklist
Device Information
This PR was tested on: ios and android.
Screenshots