Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/todoist/0.1.0/ui.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/design/bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ copy or code without host evidence, as in [READINESS.md](../integrations/READINE
| Bundle | Row class(es) | Views | Reflectors | Importers | Lenses (planned) | Folder today | Catalog entries today |
| ------------ | ---------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------- | -------------------------------------------- | ------------------------------------------------- | ---------------------------------------- |
| **Calendar** | `event-v1` | `calendar/app/`; built-in Calendar | Google Calendar (`calendar/devonian/google-calendar/`) | – | – | `calendar/` | `devonian-google-calendar` |
| **Issues** | `issue-v1` | `issue-tracker/app/`; built-in Issues | GitHub (`issue-tracker/devonian/github-issues/`), Todoist (read) | – | Issue Tracker template → `issue-v1` | `issue-tracker/` | `devonian-todoist` (GitHub has none) |
| **Issues** | `issue-v1` | `issue-tracker/app/`; built-in Issues | GitHub (`issue-tracker/devonian/github-issues/`), Todoist (read) | – | Issue Tracker template → `issue-v1` | `issue-tracker/` | `todoist` (GitHub has none) |
| **Time** | `time-entry-v1` (+ `work-project-v1`, `work-person-v1`) | `timesheets/app/`; built-in Timer | Clockify (`timesheets/devonian/clockify/`), read | – | Time tracker template → `time-entry-v1` | `timesheets/` | `timesheets` |
| **Money** | `bank-transaction-v1` | `money/app/` | Moneybird (declared only) | MT940 and camt.053 (`money/plugin.ts`) | – | `money/` | `money`, `moneybird` |
| **Tables** | Per data source (no shared class) | Built-in table view | Notion (`notion/app/`, `notion/plugin.ts`) | – | – | `notion/` | `notion` |
Expand All @@ -97,7 +97,7 @@ Notes:
endpoints (placements C, D, E), not table sync or views. Q1 asks whether
they get a part kind of their own (`route`) or stay outside this model.
- A bundle may list a reflector with no host entry point yet, as today's
catalog lists `devonian-todoist`. The bundle's card must then say which
catalog listed `devonian-todoist` until the Todoist drive app hosted it. The bundle's card must then say which
parts work, per the "declared, not verified" rule.

## 3. Catalog shape
Expand Down
2 changes: 1 addition & 1 deletion integrations/READINESS.md

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions integrations/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,25 @@
"https://atomicdata.dev/integrations/properties/app-module-integrity": "sha384-C5a6N2Xr1pA7hQJMn636j3I8E1ULjZO1988Uc0LDkKYmvDWDjKX1bPfYiUirMF8E"
},
{
"https://atomicdata.dev/properties/localId": "devonian-todoist",
"https://atomicdata.dev/properties/localId": "todoist",
"https://atomicdata.dev/properties/isA": [
"https://atomicdata.dev/integrations/classes/PluginCatalogEntry"
],
"https://atomicdata.dev/properties/shortname": "devonian-todoist",
"https://atomicdata.dev/properties/shortname": "todoist",
"https://atomicdata.dev/integrations/properties/experimental": true,
"https://atomicdata.dev/integrations/properties/enabled": false,
"https://atomicdata.dev/properties/name": "Todoist (Devonian)",
"https://atomicdata.dev/properties/name": "Todoist",
"https://atomicdata.dev/properties/emoji": "✅",
"https://atomicdata.dev/properties/description": "Bring your Todoist projects and tasks into a local issue tracker.",
"https://atomicdata.dev/integrations/properties/capabilities": "Imports active tasks and projects. Tasks open in the Issues view with their title, due day and priority. Todoist lists active tasks only, so a task shows as closed only when Todoist itself reports it checked.",
"https://atomicdata.dev/integrations/properties/events": "Was planned as: connect through the integration proxy, then Sync now (and every five minutes while the folder is open) to pull the latest tasks. The LocalThought connect dialog and sync panel that did this were removed from atomic-server, and no drive app wraps the Todoist lens yet, so nothing runs it at the pin.",
"https://atomicdata.dev/integrations/properties/limitation": "Read only: the proxy's Todoist access is data:read, so closing, editing or creating a task here is not sent to Todoist. A task that stops appearing is never assumed completed. The lens can check such a task by id and mark it completed, deleted, unavailable or unconfirmed, with when it was last seen, but no host runs that check yet, and nothing has been verified against a live Todoist account.",
"https://atomicdata.dev/integrations/properties/keywords": "todoist tasks todo projects devonian lens local tracker issues",
"https://atomicdata.dev/integrations/properties/requires-api-plugins": true,
"https://atomicdata.dev/integrations/properties/platform": "todoist"
"https://atomicdata.dev/properties/description": "Bring the active tasks of one Todoist account into an Issues table, read-only.",
"https://atomicdata.dev/integrations/properties/capabilities": "Imports the connected account's active tasks into the app's table as rows of the shared Issue class (issue-v1: title, task/v1 status, body and due date), with the Todoist priority, project, task id and presence as extra columns, so other views of that class can read them. A task that stops appearing in Todoist's active list is looked up by id once and marked completed, deleted, unavailable or unconfirmed, with when it was last seen; only completed closes it. No row is ever removed.",
"https://atomicdata.dev/integrations/properties/events": "Install from Drive apps and connect Todoist through the host's consent bar. Tasks refresh whenever the app is opened and on Sync now. Nothing runs while the app is closed.",
"https://atomicdata.dev/integrations/properties/limitation": "Read-only: the proxy's Todoist access is data:read, so closing, editing or creating a task here is not sent to Todoist, and a local edit to an imported column is overwritten at the next sync. Active tasks only: a task completed before the first import is never imported. A task gone from the active list is never assumed completed: when Todoist's by-id check answers 404 or fails, the row keeps its last known values and says so. Added as a view of another Issue table, the app imports nothing. One account per app. Waits for the stable ontology domain. Declared, and tested against a synthetic fixture only: not verified against a live Todoist account (#46), including what Todoist answers by id for a completed task.",
"https://atomicdata.dev/integrations/properties/keywords": "todoist tasks todo projects issues read-only drive app",
"https://atomicdata.dev/integrations/properties/version": "0.1.0",
"https://atomicdata.dev/integrations/properties/app-row-name": "Issue",
"https://atomicdata.dev/integrations/properties/app-row-name-plural": "Issues",
"https://atomicdata.dev/integrations/properties/app-module": "https://ontola.github.io/atomic-plugins/apps/todoist/0.1.0/ui.js",
"https://atomicdata.dev/integrations/properties/app-module-integrity": "sha384-KnALQ7jjJxz3vd4jnAIjq50twSKzF+piMq1rFeDk/xTl7En7y53QU2boOmDLZK/q"
},
{
"@id": "https://atomicdata.dev/integrations/catalog/money",
Expand Down
82 changes: 74 additions & 8 deletions integrations/issue-tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ This folder also holds the plugin's other issue sources:
bridge (moved from the `devonian` package; see its README).
- `todoist.ts`: the read-only LocalThought projection of Todoist tasks onto
an issue list (moved from `integrations/localthought/`), with
`todoist.test.ts` and the recorded-fixture check `todoist-fixture.test.ts`.
`todoist.test.ts` and the fixture check `todoist-fixture.test.ts`.
- `todoist-app/`: the **Todoist drive app**, the host for `todoist.ts`
(#99's host journey). See [Todoist drive app](#todoist-drive-app-todoist-app)
below.

## Mapping

Expand Down Expand Up @@ -71,13 +74,76 @@ check) is:
`GET /tasks/{id}` with `checked: true`, rather than a 404, is not verified:
there is no recorded fixture yet (#46) and no credentials here. If it
answers 404, completed tasks will show as `unavailable`, which is still
not a false "completed". The cases above are covered by synthetic fixture
tests in `todoist.test.ts`. **No host calls `reconcileTodoistTasks` yet.**
Nothing in atomic-server at the pin (`a12b74a`; searched again 2026-10-02, and at `bae5cdbe3` before) imports `todoist.ts` at
all, neither the projection nor this check (searched `browser/` and
`server/src`), so the `devonian-todoist` catalog entry describes a flow no
host runs today. The host journey that runs the check, and exercises these
states end to end, is still to be built.
not a false "completed". The cases above are covered by synthetic tests in
`todoist.test.ts`, and the host that runs them is the Todoist drive app
below: `todoist-app/sync.ts` calls `absentTodoistTasks`, looks the absent
tasks up through the host's proxy client, and calls
`reconcileTodoistTasks`. `fixtures/todoist/` serves SYNTHETIC rows
(`synthetic.mjs`, hand-written from Todoist's API documentation) until #46
records `api/`; its drivers model `completeTask` as "gone from `/tasks`,
`checked: true` by id", which is this fixture's assumption, not Todoist's
verified behaviour.

## Todoist drive app (`todoist-app/`)

An iframe drive app, the same shape as `../money/moneybird/` (read-only, no
npm dependencies): one ES module (`todoist-app/build.mjs`, minified, 25,926
bytes for 0.1.0; `apps.mjs`'s `APP_FOLDERS` maps catalog id `todoist` to this
folder and publishes it as `apps/todoist/<version>/ui.js`) whose
`view({ root, store })` runs in the host's null-origin frame. It imports the
connected account's **active tasks** into its own table, nothing more; the
catalog entry `todoist` (`enabled: false`) installs it.

**Flow.** "Connect Todoist" asks the host for a connection
(`store.proxy.connect`, the host's consent bar, platform `todoist`). With a
connection, every open of the view and every "Sync now" runs one pass
(`sync.ts`): `GET /api/v1/projects` and `GET /api/v1/tasks` through
`store.proxy.request`, paged by `cursor` at `limit=200`, at most 50 pages
(past that the read is reported partial); then `GET /api/v1/tasks/{id}` for
each previously imported task that a complete read no longer lists; then
`reconcileTodoistTasks` from `../todoist.ts`, whose table above says what
each row becomes. All reads happen before any write, so a failed read
leaves the table as it was. The view lists the table's tasks with their
status, presence, due day, priority, project and last-seen.

**Rows** are of the shared class `issue-v1` (#177), like the GitHub issues
app's: on first open the app adds the class to its App's `renders`, its
extras to `row-extras`, and sets its table's `classtype` (`drive.ts`;
shown on another Issue table it says so and imports nothing). Shared fields
go through `ontology-kit`'s strict resolver: `name` (the task's `content`),
task/v1 `status` (`done` only when Todoist returned `checked: true`, else
`todo`), `body` (the task's `description`) and `due-date` (the due day).
The provider extras, created once under the app's own ontology:
`todoist-task-id` (the row's identity), `todoist-presence`,
`todoist-last-seen`, `todoist-priority`, `todoist-project` and
`todoist-source` (the task as Todoist last sent it, JSON text). A pass that
finds nothing changed writes no row: `last-seen` is kept off active rows
(an active task's last sighting is the App's `todoist-last-sync`, one write
per complete read), and only a task no longer in the active list carries
its own `todoist-last-seen`.

**Local edits.** Todoist owns the imported columns: a local change to one
of them is overwritten at the next pass (#97's policy question; this plugin's
choice, the same as Moneybird's), and nothing is sent to Todoist. A row
made in the table by hand, with no Todoist task behind it, is left alone.

**Tests.** `todoist-app/sync.test.ts` (the pass against an in-memory store
and the fixture: provisioning, import, a refresh that writes no row, and
every #99 case), `todoist-app/build.test.ts` (the bundle, its size limit and
a typecheck), `todoist-fixture.test.ts` (the fixture against `todoist.ts`),
and the lane's `e2e/todoist.spec.ts`: install from the catalog, connect,
import five tasks as `issue-v1` rows, a reload that leaves every row's
properties byte-for-byte the same, a task completed in Todoist that turns
up `completed` and done, and one made unreachable that turns up
`unavailable` and still open. Run them with:

```sh
browser/node_modules/.bin/vitest run --config integrations/issue-tracker/vitest.config.ts todoist
node integrations/tooling/run-lane.mjs issue-tracker --tier e2e
```

**Not verified:** anything against a live Todoist account or the real
integration proxy (#46).

## Drive app (`app/`)

Expand Down
Loading
Loading