Skip to content

feat(memo): add task list quick actions#5983

Merged
boojack merged 1 commit into
mainfrom
feat/memo-task-actions
May 27, 2026
Merged

feat(memo): add task list quick actions#5983
boojack merged 1 commit into
mainfrom
feat/memo-task-actions

Conversation

@boojack

@boojack boojack commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Add memo task quick actions for checking all tasks and unchecking all tasks.
  • Parse GFM task list items with mdast/micromark so code blocks and inline code are ignored.
  • Re-render memo markdown content when the content changes, independent of update timestamp changes.

Validation

  • cd web && pnpm test markdown-task-actions
  • cd web && pnpm test
  • cd web && pnpm build
  • cd web && pnpm lint

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1a64356b-96f9-44d2-bb64-60156bd517eb

📥 Commits

Reviewing files that changed from the base of the PR and between e564c1a and 3080ba4.

📒 Files selected for processing (8)
  • web/src/components/MemoActionMenu/MemoActionMenu.tsx
  • web/src/components/MemoActionMenu/hooks.ts
  • web/src/components/MemoActionMenu/index.ts
  • web/src/components/MemoActionMenu/types.ts
  • web/src/components/MemoView/components/MemoBody.tsx
  • web/src/locales/en.json
  • web/src/utils/markdown-task-actions.ts
  • web/tests/markdown-task-actions.test.ts

📝 Walkthrough

Walkthrough

This PR adds bulk task-checking actions to memos by implementing Markdown task checkbox manipulation utilities, integrating them into the memo action handlers and UI menu, and fixing a remounting issue in MemoBody by using content-based keys instead of update timestamps.

Changes

Bulk task actions for memos

Layer / File(s) Summary
Markdown task manipulation utilities
web/src/utils/markdown-task-actions.ts, web/tests/markdown-task-actions.test.ts
Implements checkAllTasks and uncheckAllTasks functions using GFM-aware AST parsing and source-range-based checkbox replacement. Edits are applied in reverse order to avoid offset drift. Tests verify behavior across unordered, ordered, and nested lists, plus code-block boundary handling to avoid false matches in fenced or inline code.
Task action handlers and type cleanup
web/src/components/MemoActionMenu/hooks.ts, web/src/components/MemoActionMenu/types.ts, web/src/components/MemoActionMenu/index.ts
Adds updateMemoContent callback for persisting memo content with success toast and error handling. Implements handleCheckAllTaskListItemsClick and handleUncheckAllTaskListItemsClick handlers that transform memo content and persist via the callback. Exports handlers from the action object. Removes unused UseMemoActionHandlersReturn type and updates re-exports.
Task actions menu UI and localization
web/src/components/MemoActionMenu/MemoActionMenu.tsx, web/src/locales/en.json
Adds task-related icons and a conditional "Task actions" submenu to MemoActionMenu when tasks exist in writable, non-archived memos. Menu items are enabled/disabled based on whether open or completed tasks exist. Adds localization strings for task actions title, check/uncheck labels, and update confirmation.

Content-based remounting

Layer / File(s) Summary
Content-based key generation
web/src/components/MemoView/components/MemoBody.tsx
Adds getContentRevision helper to compute a content-derived string from length and hash. Uses this revision in MemoContent's React key instead of memo.updateTime, causing the component to remount when memo content actually changes rather than on any memo update.

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.

@boojack boojack marked this pull request as ready for review May 27, 2026 01:13
@boojack boojack requested a review from a team as a code owner May 27, 2026 01:13
@boojack boojack merged commit 648b3bd into main May 27, 2026
2 of 3 checks passed
@boojack boojack deleted the feat/memo-task-actions branch May 27, 2026 01:13
dgalanberasaluce pushed a commit to dgalanberasaluce/infra-personal that referenced this pull request Jun 13, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [neosmemo/memos](https://github.com/usememos/memos) | minor | `0.28.0` → `0.29.0` |

---

### Release Notes

<details>
<summary>usememos/memos (neosmemo/memos)</summary>

### [`v0.29.0`](https://github.com/usememos/memos/blob/HEAD/CHANGELOG.md#0290-2026-05-27)

[Compare Source](usememos/memos@v0.28.0...v0.29.0)

##### Features

- **about:** add about page with bird sprites ([411ba7b](usememos/memos@411ba7b))
- **activity-calendar:** aggregate by ViewContext.timeBasis ([8daef1d](usememos/memos@8daef1d))
- add \<Placeholder> component with ASCII bird states ([#&#8203;5949](usememos/memos#5949)) ([8c16ffa](usememos/memos@8c16ffa))
- add configurable `--log-level` flag ([#&#8203;5934](usememos/memos#5934)) ([f1e2a06](usememos/memos@f1e2a06))
- add dedicated shortcuts page ([#&#8203;5942](usememos/memos#5942)) ([1df6479](usememos/memos@1df6479))
- add link metadata endpoints ([9c5c604](usememos/memos@9c5c604))
- **frontend:** add pixel bird tilemaps ([cf55f11](usememos/memos@cf55f11))
- **memo:** add task list quick actions ([#&#8203;5983](usememos/memos#5983)) ([648b3bd](usememos/memos@648b3bd))
- **memo:** create memos on the selected calendar date ([#&#8203;5925](usememos/memos#5925)) ([ef55013](usememos/memos@ef55013))
- **notification:** add smtp email settings ([cd4f28a](usememos/memos@cd4f28a))
- **placeholder:** add woodpecker tilemap ([638e4f3](usememos/memos@638e4f3))
- render link metadata cards ([0bc5669](usememos/memos@0bc5669))
- **stats:** admin instance resource statistics ([ea0625d](usememos/memos@ea0625d))
- **stats:** support filtered all-user stats ([88ac3ec](usememos/memos@88ac3ec))
- **transcription:** explicit STT settings with provider, model, prompt ([#&#8203;5926](usememos/memos#5926)) ([238f27d](usememos/memos@238f27d))

##### Bug Fixes

- avoid update event on memo create attachments ([#&#8203;5961](usememos/memos#5961)) ([3c3382a](usememos/memos@3c3382a))
- delete user cleanup ([#&#8203;5981](usememos/memos#5981)) ([e53b7d9](usememos/memos@e53b7d9))
- **editor:** wrap selected text when pasting URL ([e0bb3a2](usememos/memos@e0bb3a2))
- **fileserver:** preserve HDR image metadata in thumbnails ([c724232](usememos/memos@c724232))
- **frontend:** correct static cache headers ([084f40b](usememos/memos@084f40b))
- **frontend:** use correct url path for memos in sitemap.xml ([#&#8203;5921](usememos/memos#5921)) ([603781f](usememos/memos@603781f))
- **httpgetter:** prevent DNS rebinding in link metadata fetch ([078488c](usememos/memos@078488c))
- **markdown:** align list items with checkboxes ([e008b1a](usememos/memos@e008b1a))
- **memo:** enforce parent visibility for comments ([4a1e401](usememos/memos@4a1e401))
- **s3presign:** preserve motion media payload ([7f1f53f](usememos/memos@7f1f53f))
- **security:** enforce attachment ownership on memo updates ([35bf761](usememos/memos@35bf761))
- **sse:** stream initial response and refresh tokens ([21303e8](usememos/memos@21303e8))
- **user:** omit internal settings from list responses ([#&#8203;5917](usememos/memos#5917)) ([1df3fe7](usememos/memos@1df3fe7))
- **web:** sync avatar changes immediately after profile update ([#&#8203;5903](usememos/memos#5903)) ([328396a](usememos/memos@328396a))

##### Performance Improvements

- lazy load heavy first-screen dependencies ([#&#8203;5947](usememos/memos#5947)) ([a6024ee](usememos/memos@a6024ee))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My43My4yIiwidXBkYXRlZEluVmVyIjoiNDMuNzMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUiXX0=-->

Reviewed-on: https://forgejo.internal/forgejo_admin/infra-personal/pulls/96
Co-authored-by: Renovate Bot <renovatebot@forgejo.internal>
Co-committed-by: Renovate Bot <renovatebot@forgejo.internal>
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