Forsion Calendar and tasks
@forsion/calendar is Forsion’s core Calendar and Tasks plugin. Source repository access is private; the npm package contains the bundled renderer, Space recipes and notices. Requires Forsion 2.13.8-beta.3 or later with the public calendar record APIs.
- Calendar keeps its existing native Space identity, saved layout, calendar settings and right-side task list. A dedicated Tasks Space uses the same task view and the native workspace sidebar. Mini uses the same renderer.
- Task lists (Tasks Space, Calendar companion, Mini) hold tasks only: note checkboxes with a date,
- [ ] … @todonote lines (Unscheduled, hosts from 2026-11-15) and rows of tables with a Done column. Dated note lines without a checkbox are events: they appear on the calendar and open a card there, not in the lists. Plain checkboxes without@stay in the note. - Capture a task with Enter and keep typing. Dates are optional; text such as “tomorrow 3pm” supplies a date. Without a writable list, the first add explicitly creates an ordinary database under the plugin’s working folder. There is no separate task database format or parallel task store.
- Completion gives immediate visual feedback, a short in-place pause and an eight-second Undo action. Native mobile hosts request one system tick for an accepted completion; undo and data refreshes stay silent. Touch feedback can be turned off in the task menu. System preferences still apply. Desktop and browser hosts do not pretend to vibrate.
- Event menus, record copy/paste, conditional undo/redo and complete note/record copies use the host’s public
calendar.eventsAPI. Field editing uses the realui.mountRecordeditor. Calendar/Todo data comes fromdatabases,noteTasksandcalendar; no host runtime imports are used. - The host pins the npm version in
desktop/package.json, seeds it throughbuiltinBundles.json, classifies it throughCORE_BUNDLE_IDSand checks npm updates through the existing core updater. Android bundles the same npm renderer; a newer compatible installed version takes precedence. It is not a marketplace entry. skills/calendar-todos/SKILL.mdships in the package. The local Agent engine scans an installed plugin'sskills/folder, so the Agent learns that the user's to-dos are rows of their calendar (defaulthuman://CALENDAR.db), may have no date, and are added and ticked with theamadeus_*calendar tools — never written as a note. Cloud sessions don't load plugin skills; there the calendar tool definitions carry the same three facts.
Development
npm ci
npm run typecheck
npm run check:all-day # Real plugin entry: timed/all-day transitions, remounts, task/date-marker source semantics
npm test # 先 build,再跑单测(含按宿主装法跑 main.js 的入口测试)
npm run install:dev # 装进 ~/.forsion-dev/plugins/forsion-calendar
All-day visibility against the real desktop host: build this plugin and Genesis desktop, then run
GENESIS_DESKTOP_DIR=/absolute/path/to/Forsion-Genesis/desktop npm run check:all-day:gui.
The isolated fixture includes a checkbox-backed calendar and checks timed/all-day transitions and reloads without editing user data.
Note items in the lists and on the calendar: after building this plugin and Genesis desktop, run
GENESIS_DESKTOP_DIR=/absolute/path/to/Forsion-Genesis/desktop npm run check:note-items:gui.
The isolated fixture checks that dated note events stay off the Tasks Space, Calendar companion and Mini while note tasks stay in them, source filters, completion undo, date-only Markdown changes, and that events remain on the calendar after reload. Screenshots and report.json default to /tmp/forsion-calendar-note-items; set CALENDAR_NOTE_ITEMS_ARTIFACT_DIR to retain another run. Set CALENDAR_PLUGIN_DIR to the 0.1.9 release checkout for the expected-failing visibility baseline.
事件详情 / 草稿浮层定位回归:先构建插件与 Genesis desktop,再运行
GENESIS_DESKTOP_DIR=/absolute/path/to/Forsion-Genesis/desktop npm run check:card-placement。
使用隔离 home,在主窗口和独立日历窗口检查真实卡高、滚动、80% / 100% / 120% 缩放与窗口尺寸变化;
检查覆盖主窗 / 独立窗的实际卡片高度、滚动、缩放、分隔线命中,以及切换 View 后浮层隐藏与清理。
截图和 report.json 默认输出到系统临时目录 forsion-calendar-card-placement。
待办输入框 × 宿主版本(真 Electron,隔离 home):先在一份 Genesis 检出里 cd desktop && npm run build,再跑
node scripts/todo-dock.check.cjs <那份检出>/desktop --host old|new。old = 没有 addColumn / chatBoxCapabilities 的宿主
(如 v2.13.8-beta.3),new = 都有。加 --plugin <旧版目录> 跑负对照,应该挂。
主页小组件(今天 / 待办)× 宿主(真 Electron):先 npm run build,在 Genesis 检出的 desktop 里 npx electron-vite build,再跑
CALENDAR_PLUGIN_DIR=<本检出> node scripts/home-widgets.check.cjs(台架把本检出以 99.0.0 装进临时家目录,免得被随包的旧版顶掉)。
npm pack --pack-destination artifacts prepares the release archive. Publishing to npm requires explicit approval of the package version. Preparing an archive or pushing a feature branch does not publish it.