Skip to content

Dates, agenda and reminders; password-protected notes - #6

Merged
songtianlun merged 7 commits into
mainfrom
ccr-7589ce7b-r38rqj
Nov 9, 2026
Merged

songtianlun merged 7 commits into
mainfrom
ccr-7589ce7b-r38rqj

Conversation

@songtianlun

Copy link
Copy Markdown
Member

This is the Android counterpart of ivynote/ivynote#(same branch): task dates and reminders, plus password-protected notes.

Changes

  • Editor page (rebuilt from ivynote): date chips, the date picker and @明天 9点 completion. Password protection goes through @ivynote/editor/protection: lock panel, every edit encrypted, and the set, change, remove and lock dialogs. The app only ever sees and syncs the encrypted body; the page sends a protection {protected, locked} message.
  • Note menu: 日期与提醒, 设置密码 / 更改密码 / 移除密码 / 立即锁定. The format bar gets a date button. Protected notes show a lock and have no share button.
  • Agenda AgendaSheet (library menu → 日程): open dated to-dos across the library. They can be checked off in place (only if the line hasn't changed), and tapping one opens the note at the task.
  • Reminders reminders/Reminders.kt:
    • They are rescheduled into AlarmManager 1.5 s after any change, exact when the system allows it, otherwise setAndAllowWhileIdle.
    • Pending reminders are saved to preferences, so BOOT_COMPLETED and MY_PACKAGE_REPLACED can restore them.
    • Tapping a notification opens the note in its library.
    • On Android 13+, notification permission is requested the first time there is something to remind about.
  • core: Tasks (parse, reminders, agenda, toggle, all matching the web rules) and NoteLock.isEncrypted. Search matches protected notes by title only.

Testing

  • ./gradlew -Pivy.coreOnly=true :core:test: passes, including 5 new TasksTest tests.
  • The editor bundle was loaded headless in Chromium with a fake IvyAndroid bridge:
    • date chips render
    • command('protect') produces an encrypted body
    • reloading the encrypted body shows the lock panel, and the correct password unlocks it
    • edits stay encrypted
    • setBody sends nothing back
  • The app module was not compiled here: the Android SDK host (dl.google.com) is blocked in this environment. Please let CI (:app:assembleDebug, lint) or Android Studio confirm the build. The changes follow the existing code's APIs (Compose Material3, extended icons Event/Lock/LockOpen/VpnKey, AlarmManager, NotificationCompat).

Generated by Claude Code

- Editor page (rebuilt from ivynote): task date chips, the date picker and
  "@明天 9点" completion; password protection through
  @ivynote/editor/protection — lock panel, sealing every edit, the set /
  change / remove / lock dialogs. The app only ever sees sealed bodies;
  the page reports {protected, locked} for the note menu.
- Note menu: 日期与提醒, 设置密码 / 更改密码 / 移除密码 / 立即锁定; a date
  button in the format bar; protected notes show a lock and cannot be shared.
- Agenda sheet (library menu → 日程): open dated to-dos across the library,
  check off in place, open a note at its task.
- Reminders: the next reminders of a library become AlarmManager alarms a
  moment after any change (exact when allowed), are restored after a reboot
  or update, and open their note when tapped. Android 13+ asks for
  notification permission the first time there is something to remind of.
- core: Tasks (parse, reminders, agenda, toggle as the editor does) and
  NoteLock.isEncrypted, with tests; search matches protected notes by title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
- Tasks.agendaTree groups the agenda like the web: overdue, a branch per
  day for the coming week, then by month; agendaDay / agendaMonth name them.
- The agenda sheet folds and unfolds branches (overdue, today and tomorrow
  open by default), remembered on the device; days of a branch show only
  times, overdue and month branches show dates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
Lint (MissingPermission) does not follow the check in mayNotify() or treat
runCatching as handling SecurityException. Check POST_NOTIFICATIONS right
before notify() and catch SecurityException for a permission withdrawn in
between. Drop the version check below minSdk (ObsoleteSdkInt).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
- Editor page (rebuilt): "/" insert menu, the date picker as a bottom
  sheet, @ completion with 选择日期和重复…, the selection toolbar for mice.
- + first in the format bar opens the menu (command 'insert'); its photo
  and file items arrive as a 'pick' message and open the app's pickers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
Rebuilt from ivynote: menu rows with an icon tile, a description and the
Markdown they write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
Rebuilt from ivynote: "🔁 every weekday" shows as one chip (it read as
"every week" plus "day"); @ completes "1分钟后", "半小时后" and alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZ7eDpLFZCVDPw4eURZJLR
@songtianlun
songtianlun merged commit 842cf24 into main Nov 9, 2026
2 checks passed
@songtianlun
songtianlun deleted the ccr-7589ce7b-r38rqj branch November 9, 2026 15:14
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.

2 participants