Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = {
jest: true,
},
extends: [
'@doist/eslint-config/recommended-type-checked',
'@doist/eslint-config/simple-import-sort',
'@todoist/eslint-config/recommended-type-checked',
'@todoist/eslint-config/simple-import-sort',
],
root: true,
ignorePatterns: ['scripts/', '.eslintrc.cjs', 'global-setup.js', 'jest.config.js'],
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["github>doist/renovate-config:frontend-base"],
"extends": ["github>todoist/renovate-config:frontend-base"],
"hostRules": [
{
"hostType": "npm",
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- 'packages/ui-extensions-core/**'
- 'package.json'
- 'package-lock.json'
- 'scripts/**'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Adding scripts/** and .github/workflows/** to the pull_request trigger expands the fork-PR surface of a job that still injects NODE_AUTH_TOKEN: ${{secrets.GH_PACKAGES_TOKEN}} in the Bootstrap step. Doist's Secrets Management standard says not to use secrets in workflows triggered by pull requests from forks (https://handbook.doist.com/doc/standard-secrets-management-). Skip the secret-bearing Bootstrap step for fork PRs (or move it to a trusted workflow), or drop the token if the public @todoist/* packages no longer require GitHub registry auth.

- '.github/workflows/**'
- '.eslintrc.cjs'
- 'tsconfig.json'

jobs:
ci-core:
Expand All @@ -13,11 +17,14 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Configure doist package repository
- name: Configure Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

- name: Release safety checks
run: npm run test:release

- name: Bootstrap
run: npm run bootstrap-ci:common
env:
Expand Down
116 changes: 59 additions & 57 deletions .github/workflows/core-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,71 @@
name: Publish core package
name: Publish retained core artifact

on:
push:
tags:
- 'core-v*'
workflow_dispatch:
inputs:
artifact_run_id:
description: Original successful core-pack.yml run ID (never rerun/repack on retry)
required: true
type: string
release_sha:
description: Full source SHA from that main pack run
required: true
type: string
release_version:
description: Exact manifest version, initially 6.0.1
required: true
type: string
destination:
description: Publish both registries or complete one missing mirror
type: choice
required: true
default: both
options: [both, npmjs, github]
release_tag:
description: Use migration-recovery for an older missing mirror
type: choice
default: latest
options: [latest, migration-recovery]

permissions:
# Enable reading repository contents (allows checkout without token)
contents: read
# Enable the use of OIDC for trusted publishing and npm provenance
id-token: write
# Enable the use of GitHub Packages registry
packages: write

concurrency:
group: ui-extensions-core-release
cancel-in-progress: false

jobs:
# Publish to GitHub package registry
publish-github:
publish:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The PR description and the prior review rounds reference scripts/release.mjs, scripts/release-policy.mjs, .github/workflows/core-pack.yml, and their mocked tests (inspect/downloadOriginal guards, both-registry preflight, artifact recovery) — none of those files exist in this diff or in the working tree. What actually ships is a single workflow that packs and publishes directly, with no digest/provenance validation, no both-registry preflight, and no consumer of the uploaded core-package artifact for the retry path the README describes ("Keep the original tarball if either registry needs a retry"). Either restore the described publisher and its tests or correct the PR description and README so operators know the retained artifact is currently download-only and retries are manual.

if: github.repository == 'todoist/ui-extensions' && github.ref == 'refs/heads/main'
environment: npm-release
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 15
permissions:
contents: read
actions: read
packages: write
id-token: write
env:
ARTIFACT_RUN_ID: ${{ inputs.artifact_run_id }}
RELEASE_SHA: ${{ inputs.release_sha }}
RELEASE_VERSION: ${{ inputs.release_version }}
RELEASE_TAG: ${{ inputs.release_tag }}
GH_TOKEN: ${{ github.token }}
GH_PACKAGES_TOKEN: ${{ github.token }}
steps:
- name: Git checkout
uses: actions/checkout@v6

- name: Configure Doist package repository
uses: actions/setup-node@v6
- uses: actions/checkout@v6
with:
node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com/
scope: '@doist'

- name: Install dependencies
run: npm run bootstrap-ci:common
env:
NODE_AUTH_TOKEN: ${{secrets.GH_PACKAGES_TOKEN}}

- name: Publish package
working-directory: ./packages/ui-extensions-core
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GH_PACKAGES_TOKEN}}

# Publish to npm package registry
publish-npm:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Git checkout
uses: actions/checkout@v6

- name: Configure Doist package repository
uses: actions/setup-node@v6
ref: ${{ github.sha }}
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
scope: '@doist'

- name: Install dependencies
run: npm run bootstrap-ci:common

# npm must be upgraded AFTER installing dependencies to avoid package-lock.json
# sync errors. Upgrading npm before running npm ci can cause lock file format
# mismatches that prevent successful dependency installation.
- name: Ensure npm 11.5.1 or later is installed
run: npm install -g npm@latest

- name: Publish package
working-directory: ./packages/ui-extensions-core
run: npm publish --provenance --access public
- run: npm install --global npm@11.19.0
# No dependency install, rebuild, version bump or lifecycle invocation here.
- run: node scripts/release.mjs download release-artifact
- name: Publish npm with configured trusted publishing
if: inputs.destination == 'both' || inputs.destination == 'npmjs'
run: node scripts/release.mjs publish release-artifact npmjs
- name: Publish public GitHub mirror
if: inputs.destination == 'both' || inputs.destination == 'github'
run: node scripts/release.mjs publish release-artifact github
37 changes: 37 additions & 0 deletions .github/workflows/core-pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pack core release artifact
run-name: ui-extensions-core pack v1 ${{ github.sha }}

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ui-extensions-core-release
cancel-in-progress: false

jobs:
pack:
if: github.repository == 'todoist/ui-extensions' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- run: npm ci --ignore-scripts
- run: npm run test:release
- run: npm run integrity-check --workspace=packages/ui-extensions-core
- name: Pack once without lifecycle hooks
run: node scripts/release.mjs pack release-artifact
- uses: actions/upload-artifact@v4
with:
name: ui-extensions-core-release
path: release-artifact/
if-no-files-found: error
retention-days: 90
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ config.json
**/es
**/lib
**/styles

# Retained release artifacts
/release-artifact/
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Todoist UI Extensions

This repository contains the source code for the `@doist/ui-extensions-core` npm package used to develop UI Extensions for [Todoist](https://developer.todoist.com/ui-extensions) and [Twist](https://developer.twist.com/ui-extensions).
This repository contains the source code for the `@todoist/ui-extensions-core` npm package used to develop UI Extensions for [Todoist](https://developer.todoist.com/ui-extensions) and [Twist](https://developer.twist.com/ui-extensions).

## Repository structure

Expand All @@ -13,3 +13,15 @@ To install the dependencies run `npm install`.
_TodoistCard_ components and _Todoist UI Extension Data Exchange Format_ types. You can use this package to construct your integration's UI which will then provide the TodoistCards JSON payload to be rendered on our clients.

You can learn more about building Todoist UI Extensions [here](https://developer.todoist.com/ui-extensions) and Twist UI Extensions [here](https://developer.twist.com/ui-extensions).

## Release and migration status

See [the release runbook](docs/releasing.md) for the pack-only bootstrap, retained
artifact publication/recovery, registry access and the M02 lockfile gate.

`ui-extensions-react` was [retired in #334](https://github.com/Doist/ui-extensions/pull/334).
It has no active manifest, implementation or publisher here. The two remaining
React test files are not an active workspace. There is no supported
`@todoist/ui-extensions-react` release or drop-in renderer replacement in core.
See [consumer compatibility](docs/consumer-compatibility.md) before changing a
legacy renderer dependency or a pre-v6 core consumer.
56 changes: 56 additions & 0 deletions docs/consumer-compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Current core and retired React consumers

The supported current-forward release is `@todoist/ui-extensions-core@6.0.1`.
It preserves the v6 card construction, serialization and Todoist/Twist data-exchange
API. It does not render React components, implement renderer connection hooks or
ship a stylesheet. Its only exported package entry is `.`; output is CommonJS,
ES modules and declarations under `dist/`.

[Retirement PR #334](https://github.com/Doist/ui-extensions/pull/334), merged as
`21eb3de2512cf05f2c57a1a2b6c9be1c87ced732`, removed the React source, manifest,
workspace and publishing workflows. Existing historical versions remain intact.
The orphan tests under `packages/ui-extensions-react/src/types/` do not provide a
buildable producer. Rebuilding an old branch or republishing the retired package
under a new scope is not part of this migration.

## Exact consumer blockers

Current source inspection at the following commits confirms incompatible edges:

| Consumer | Declared dependencies | Missing renderer API |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `frontend-toolbox` `ba614970a60636e7a67e3280aa5805b8311e1dc3`, `packages/extensions-renderers` | core peer `^4.1.1`, React peer `^11.0.0` | `CanHaveAutoFocus`, `TextInputist`, `ToggleInputist`, `ClipboardAction`, `SubmitActionist` in `src/renderers/input-renderers.tsx` and `actions.tsx` |
| `twist-web` `30d98585dddc9e8fe337186acbd5fd75f4454cb6` | core `3.2.1`, React `6.0.0` | `AdaptiveCardRenderer`, `useAdaptiveCardsConnection`, `BridgeActionCallbacks`, `ExtensionError`, `ExtensionVersion`, `ExtensionContext`, `ChoiceSetInputist`, `CanHaveAutoFocus`, `AdaptiveCardistCard`, `DoistCardResult`, `DoistCardConnectionParams`, plus `styles/index.css` |

These symbols are absent from current core. Core's `SubmitAction`/`TextInput`
construct serialized card data; they are not substitutes for renderer subclasses
such as `SubmitActionist`/`TextInputist`. Do not replace the React package with a core
alias or claim a scope-only dependency update is compatible. Preserve each legacy
dependency until the consumer owners approve and implement a supported renderer
path in current source, or remove the feature through a separately approved product
change. Henning routes this to the existing UI Extensions/toolbox/Twist owners;
the specific D06 owner assignment is not available in this repository.

## Core API migration is also required for pre-v6 clients

The breaking v6 API change predates this scope migration; see
[PR #342](https://github.com/Doist/ui-extensions/pull/342). Examples:

| Legacy API | Current core API |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `DoistCard`, `DoistCardVersion` | `TodoistCard`, `TodoistCardVersion` |
| `DoistCardAction*`, `DoistCardContext*`, `DoistCardExtensionType` | corresponding `TodoistCard*` types (check Twist-specific types below) |
| `DoistCardRequest`, `DoistCardResponse`, `DoistCardError`, `DoistCardBridge*` | corresponding `TodoistCard*` types |
| `DoistContextUser` | `BaseContextUser` |
| `card.doistCardVersion` | `card.todoistCardVersion` |
| Twist's legacy `DoistCardContextChannel`, `DoistCardContextConversation`, `DoistCardContextThread` | inspect `TwistContextChannel`, `TwistContextConversation`, `TwistContextThread` and actual shapes in `src/types/twist.ts` |

`ContextMenuData` still exists. Requests now require both
`maximumTodoistCardVersion` and the preserved `maximumDoistCardVersion` compatibility
field. Serialized cards preserve the existing legacy version keys. Consumers with
subclasses compiled against older core class names must recompile against v6;
serializer base-class identity means a dependency-only bump is insufficient.
These are migration starting points, not a verified compatibility assertion for
core 3/4 plus retired renderer 6/11. Consumer owners must verify type checks,
renderer/connection behavior, schema serialization and CSS in their actual current
applications after a forward renderer decision and real package publication.
Loading
Loading