@nocobase/app-skills 0.1.0-beta.44 → 0.1.0-beta.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -467,6 +467,19 @@ A child route presented as a non-modal page covering the content area, keeping t
|
|
|
467
467
|
- Example: `@nocobase/route-child-page-demo` (`pnpm exec shadcn view @nocobase/route-child-page-demo`)
|
|
468
468
|
- After installing: Return RouteChildPage from the component of a child route. It covers the nearest positioned ancestor, so render a page's own outlet beside its container rather than inside it. A child page that can only render inside another one, such as the child page of a tab, covers that one whole.
|
|
469
469
|
|
|
470
|
+
## Task Center
|
|
471
|
+
|
|
472
|
+
### task-center-ui
|
|
473
|
+
|
|
474
|
+
Presentational components for a personal task center layered as source → subject → status → task cards: a source navigation with subjects folded under each source, pending counts and a client-side subject search; To do / Done / All tabs; day-grouped task cards whose summary each task type contributes; one-type-at-a-time batch selection with a floating action bar and confirmation; and a right-side detail drawer whose form and actions the task's business supplies. Takes data already shaped and translated; pairs with a task index such as @nocobase/app-plugin-task-center.
|
|
475
|
+
|
|
476
|
+
- Kind: block
|
|
477
|
+
- Install: `yes n | pnpm exec shadcn add @nocobase/task-center-ui`
|
|
478
|
+
- Installs to: `client/extensions/nocobase-task-center-ui/`
|
|
479
|
+
- Plugin dependencies: none
|
|
480
|
+
- Example: `@nocobase/task-center-ui-demo` (`pnpm exec shadcn view @nocobase/task-center-ui-demo`)
|
|
481
|
+
- After installing: Pure presentation: map your task index into TaskNavSource and TaskCardData (types.ts) with translated labels, render each task type's summary with TaskSummaryFields, its batch actions through useTaskSelection, TaskBulkBar and TaskBulkConfirm, and its detail form and actions inside TaskDetailSheet. Merge locales/ into your locale resources.
|
|
482
|
+
|
|
470
483
|
## Workflows
|
|
471
484
|
|
|
472
485
|
### workflow-management
|
|
@@ -98,6 +98,8 @@ When the upgrade changes application migrations or registered plugins that suppl
|
|
|
98
98
|
|
|
99
99
|
When BASE → TARGET changes Realtime contracts, read [Realtime upgrades](references/realtime-upgrade.md) during planning and include application-owned consumers, custom plugins, workers and transport/test adapters in step 5. Topic authorization, ignored publication promises and recovery gaps can survive type checking; use the actual package contracts and project usage to decide which migration steps apply.
|
|
100
100
|
|
|
101
|
+
When BASE → TARGET changes notification contracts, read [Notification upgrades](references/notification-upgrade.md) during planning. Include application-owned test-send forms, API clients, permissions, log pages, E2E fixtures and custom channel extensions in step 5; distinguish removed TestAdapter APIs from deprecated registration and configuration APIs that remain compatible.
|
|
102
|
+
|
|
101
103
|
Then ask the project which of those files it has also touched:
|
|
102
104
|
|
|
103
105
|
```bash
|
|
@@ -163,6 +165,8 @@ pnpm typecheck && pnpm test && pnpm lint && pnpm build
|
|
|
163
165
|
|
|
164
166
|
For a Realtime contract change, complete the applicable [Realtime acceptance checks](references/realtime-upgrade.md#verify-the-migrated-application), including access denial, reconnect catch-up and publication failure; a connected socket alone is insufficient evidence.
|
|
165
167
|
|
|
168
|
+
For a notification contract change, complete the applicable [notification acceptance checks](references/notification-upgrade.md#verify-the-migrated-application) through business notifications, including delivery results, log permissions and inbox ownership. Preserve historical records and report which configured transports were exercised.
|
|
169
|
+
|
|
166
170
|
Report the range merged, how each contested file was decided, any manual actions and their validation, and how to roll back.
|
|
167
171
|
|
|
168
172
|
## Crossing several releases
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Notification upgrades
|
|
2
|
+
|
|
3
|
+
## Decide which changes apply
|
|
4
|
+
|
|
5
|
+
Use this reference when BASE → TARGET changes notification contracts consumed by the application or its plugins. The `@nocobase/app-plugin-notification` 2.0.0 prerelease line introduces class-based channel registration and removes the TestAdapter protocol. Check the actual resolved BASE and TARGET packages, declarations and release notes; a merged framework PR does not establish which version an application has installed. Apply only changes the application still needs.
|
|
6
|
+
|
|
7
|
+
Use the compatible package set from the target template and the application's transport plugins, including `@nocobase/app-plugin-notification-in-app`, `@nocobase/app-plugin-notification-providers` and `@nocobase/app-plugin-notification-web-push` when installed. Packages need not share a version number. Inspect `skills/nocobase-app-plugin-notification/SKILL.md` and its configuration, extension and diagnostics references in the exact target notification tarball before installation. After installation and `pnpm nocobase skills sync`, use the synchronized notification Skills; an installed Skill may still describe BASE. Do not edit generated `.agents/skills/` copies to make an older runtime appear upgraded.
|
|
8
|
+
|
|
9
|
+
Browser toasts are a separate capability. The older removal of `@nocobase/app-plugin-notification-provider` is covered by [Notifications and the application toaster](edge-cases.md#notifications-and-the-application-toaster); it is not the removal of notification transports or the inbox.
|
|
10
|
+
|
|
11
|
+
## Inventory application-owned consumers
|
|
12
|
+
|
|
13
|
+
Search application code, custom plugins, test helpers, E2E fixtures and documentation. Start with the old public names and follow their aliases and wrappers:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
rg -n '(NotificationTest|testTargets|testSends|listTestTargets|sendTest|getTestStatus|notification:test|x-nocobase-notification-test|registerChannel(Type)?|registerProvider|notificationExtensionRegistryToken)' . --glob '*.{ts,tsx,js,jsx,mts,cts,mjs,cjs,md}' --glob '!node_modules/**' --glob '!dist/**'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Inspect `test` hooks on identified channel and Provider definitions, including class statics. Review configuration defaults, environment mappings and `config.provider` consumers separately without printing live configuration or credentials. Search application-owned permissions and seeds for the old test-send grant; review existing migration files as history, without rewriting them. Include owned plugin repositories outside the application, and record unavailable third-party implementations as an unverified dependency.
|
|
20
|
+
|
|
21
|
+
Log pages can depend on `listTestTargets()` only to obtain channel labels or Provider identities even when they have no test-send button. Inspect those consumers as well as visible forms; removing the button alone leaves the log page broken.
|
|
22
|
+
|
|
23
|
+
## Remove the retired testing surface
|
|
24
|
+
|
|
25
|
+
When the target no longer exports the TestAdapter protocol, remove `NotificationTestAdapter`, related `NotificationTest*` types/errors, built-in form descriptors and extension `test` hooks. Remove application calls to the retired registry/runtime test methods and the client methods `listTestTargets()`, `sendTest()` and `getTestStatus()`.
|
|
26
|
+
|
|
27
|
+
The retired routes are `GET /api/notifications/testTargets`, `POST /api/notifications/testSends` and `GET /api/notifications/testSends/{notificationId}`. They return 404 in the new core; the `x-nocobase-notification-test` header does not restore them. Remove test-send buttons/dialogs, their fields and validation, test-only translations, and active `notification:test` / `send` permission declarations and grants from application-owned seed definitions. Preserve unrelated page permissions and never edit merged migrations to remove an old permission. Do not restore the protocol with a generic HTTP send endpoint merely to keep old forms or E2E fixtures running.
|
|
28
|
+
|
|
29
|
+
Keep notification management and log pages that the product uses. Read historical channel/Provider identities from recorded deliveries (`channelName`, `channelType`, `providerType`), rather than fetching test metadata or requiring a currently configured channel. Keep log access protected by `page:notification.logs` / `access`. The supported core log routes remain `GET /api/notifications/logs` and `GET /api/notifications/logs/{logId}`; inspect the target declarations for their response shape and pagination.
|
|
30
|
+
|
|
31
|
+
Replace test-send API setup in E2E with an existing business action that produces a notification, or a server-side fixture resolving `notificationServiceToken` and calling `send()` with complete input. Keep assertions for delivery, permissions, logs and inbox behavior. Only coverage specific to the removed form/protocol goes away; do not drop the notification E2E suite wholesale.
|
|
32
|
+
|
|
33
|
+
## Preserve configuration and extension compatibility
|
|
34
|
+
|
|
35
|
+
The following APIs are deprecated, not removed:
|
|
36
|
+
|
|
37
|
+
- Prefer `type` in new channel configuration. `provider` remains an alias: either is accepted, both must match, and conflicts fail validation. Preserve configured channel names, enabled state, transport settings, credentials and environment mappings. A disabled placeholder can omit the discriminator; do not enable or populate it merely to migrate the spelling.
|
|
38
|
+
- Application configuration snapshots normalize valid discriminators into both aliases, including defaults, environment overlays and reloads. Existing business `config.provider` reads remain supported and deprecated. Use `NotificationConfigInput` for unnormalized configuration accepting either key; the legacy-compatible `NotificationConfig` read type retains required `provider`. A class constructor receives normalized `ChannelConfig` with `type` and no `provider` alias. Do not assume every raw configuration object has been normalized.
|
|
39
|
+
- `registerChannel()` and `registerProvider()` and legacy factories remain available for compatibility. New extensions use `registerChannelType(ChannelClass)` with a class implementing `ChannelInstance`; official implementations use the class API, with old calls confined to compatibility code and its tests. Existing third-party registrations are not an automatic upgrade failure. Remove retired test hooks even from a retained legacy extension.
|
|
40
|
+
|
|
41
|
+
For a custom extension being migrated, follow the target notification Skill's channel extension reference for exact types and a complete class example. Register the class before runtime activation; its static `type` is globally unique, and each configured name gets an independent instance. The constructor receives `(context, config)`; `ChannelContext` contains `channelName` and `container`. Resolve application services through `context.container.resolve(...)`. Implement `validateMessage`, `prepare` and `send`, with optional `initialize` and `close`; preserve cancellation, result classification and cleanup of resources owned by the instance. A standalone manager must receive the host container if the extension depends on host services.
|
|
42
|
+
|
|
43
|
+
Preserve delivery identities during this change. Built-in classes retain historical `channelType` values such as `email` for SMTP/Resend and `im` for the webhook transports, alongside `providerType`; those stored fields are not extra registrations to remove. A custom legacy extension with a different message-family identity can keep its compatible factories. Moving it to a class requires draining pending/retryable work or an explicit history migration plan before changing that identity. Do not rename or replace a configured channel while its old deliveries still need retries.
|
|
44
|
+
|
|
45
|
+
`send()` and `sendTransient()` inputs and outputs are unchanged. `send()` still takes `messages` keyed by configured channel name; this upgrade introduces neither an array input nor a `submit()` API. TestAdapter removal itself requires no database migration or deletion of notifications, deliveries, attempts, retry audits or inbox records, including historical test notifications. Review separate package migrations through the [database upgrade workflow](database-upgrades.md).
|
|
46
|
+
|
|
47
|
+
## Verify the migrated application
|
|
48
|
+
|
|
49
|
+
After the upgrade Skill's package checks, exercise the affected application behavior. Select checks for the actual consumers and configured transports, and record unavailable scenarios explicitly:
|
|
50
|
+
|
|
51
|
+
- **Configuration and extensions:** Existing provider-only configuration still loads; type-based configuration selects the intended transport. When changing aliases, check defaults/environment overlays and reload behavior, including conflicts. For a migrated custom class, verify validation, separate named instances, service resolution, initialization failure and cleanup. Do not mistake retained compatibility calls or stored identity fields for unfinished removal work.
|
|
52
|
+
- **Business delivery:** Trigger an authorized business notification or server-side fixture and inspect its notification ID, final delivery results and attempts. A returned ID only proves submission, not final delivery. Verification creates a real delivery; use the recipient/channel scope already authorized and do not send to external recipients merely because credentials exist.
|
|
53
|
+
- **Logs and permissions:** The log page loads without test target metadata, historical records remain readable even when a channel is no longer configured, and unauthorized users cannot read protected logs. Application controls no longer call the retired test endpoints; no general-purpose test-send permission or replacement endpoint has been added.
|
|
54
|
+
- **In-app, when used:** The intended user receives the business notification, unread state updates, read/unread state survives reload, and the business link opens at the application's deployment base path. Another user cannot read or modify that recipient's messages. Preserve the existing inbox navigation and access policy.
|
|
55
|
+
- **Retries and history, when affected:** Pending/retryable deliveries remain tied to their original channel and Provider identity, without rerouting or duplicate submission. Retain existing retry/idempotency coverage; do not resend an outcome that is unknown merely to obtain a green check.
|
|
56
|
+
|
|
57
|
+
Report the resolved notification versions, removed consumers, retained compatibility paths and observed delivery results alongside the template version range. Passing type checks alone, or removing the test button, does not establish notification upgrade success.
|