Skip to content

Commit 0d57f90

Browse files
committed
Merge origin/main — keep the PR's richer user-facing copy over #2618's interim rewrite
2 parents 520c4e1 + 2bb193d commit 0d57f90

53 files changed

Lines changed: 342 additions & 1901 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/object-nav-filters.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@objectstack/spec': minor
3+
---
4+
5+
feat(spec): `ObjectNavItem.filters` — declarative URL filter conditions targeting the parameterized bare data surface (objectui ADR-0055, objectui#2251).
6+
7+
An object nav item can now carry `filters: Record<string, string>` (equality semantics). The shell resolves such an entry to `/:objectName/data?filter[<field>]=<value>` — an unanchored data surface with removable filter chips — instead of a saved list view. Use it for one-off / parameterized slices (dashboard drill-throughs, "assigned to me" links); slices worth curating stay on `viewName`. Values support the same `{current_user_id}` / `{current_org_id}` template variables as `recordId`. Target precedence within `type: 'object'`: `recordId``filters``viewName`. Purely additive — items without `filters` are unaffected.

content/docs/ui/apps.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ Links to an object's list view:
6666
{ id: 'nav_accounts', type: 'object', label: 'Accounts', objectName: 'account', icon: 'building', viewName: 'all_accounts' }
6767
```
6868

69+
Three optional target fields refine where the entry lands (precedence: `recordId``filters``viewName`):
70+
71+
- `viewName` — anchor the entry to a named list view.
72+
- `recordId` — deep-link straight to one record ("My Profile"); supports `{current_user_id}` / `{current_org_id}` template variables.
73+
- `filters` — a one-off parameterized slice: the entry lands on the **bare data surface** (`/:objectName/data`) with each condition serialized as a removable `filter[<field>]=<value>` URL chip, not anchored to any saved view. Use it for drill-throughs and "assigned to me"-style links instead of authoring a view; values support the same template variables. The surface shows what row-level permissions allow — it is not a security feature.
74+
75+
```typescript
76+
{ id: 'nav_my_open', type: 'object', label: 'My Open Deals', objectName: 'opportunity',
77+
filters: { owner_id: '{current_user_id}', status: 'open' }, icon: 'user-check' }
78+
```
79+
6980
### Dashboard Navigation
7081

7182
Links to a dashboard:

examples/app-crm/objectstack.config.ts

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import * as views from './src/views/index.js';
77
import * as apps from './src/apps/index.js';
88
import * as dashboards from './src/dashboards/index.js';
99
import * as datasets from './src/datasets/index.js';
10-
import * as reports from './src/reports/index.js';
1110
import * as pages from './src/pages/index.js';
1211
import * as actions from './src/actions/index.js';
13-
import * as emails from './src/emails/index.js';
1412
import { allHooks } from './src/hooks/index.js';
1513
import { allFlows } from './src/flows/index.js';
1614
import {
@@ -24,29 +22,19 @@ import {
2422
WonDealActivitySharingRule,
2523
} from './src/security/index.js';
2624
import { CrmSeedData } from './src/data/index.js';
27-
import { LeadCsvImportMapping, ContactJsonSyncMapping } from './src/data/crm-mappings.js';
2825
import { CrmDatasource, CrmAnalyticsDatasource } from './src/datasources/crm.datasource.js';
2926
import { CrmTranslationBundle } from './src/translations/crm.translation.js';
30-
import { ContactExtension } from './src/extensions/contact.extension.js';
31-
import { CustomerPortal } from './src/portals/customer.portal.js';
32-
import { CrmLightTheme, CrmDarkTheme } from './src/themes/crm.theme.js';
33-
import { LeadScoringJob, PipelineReportJob, RenewalSweepJob } from './src/jobs/crm-jobs.js';
34-
import {
35-
PipelineSummaryEndpoint,
36-
LeadConvertEndpoint,
37-
MarketingWebhookEndpoint,
38-
} from './src/api/crm-endpoints.js';
39-
import { OpportunityChangedWebhook, DealWonSlackWebhook } from './src/webhooks/crm-webhooks.js';
40-
import { PipelineCube, LeadFunnelCube } from './src/analytics/crm.cube.js';
41-
import { HubSpotConnector, SlackConnector } from './src/connectors/crm-connectors.js';
4227

4328
/**
44-
* CRM example — exercises the full metadata loading pipeline with at
45-
* least one record of every form-bearing metadata type so the Studio
46-
* metadata-admin UI can be developed and validated against real data.
29+
* CRM example — a MINIMAL, realistic relational bundle that smoke-tests the
30+
* metadata application loading pipeline: objects/relationships → views →
31+
* app → dashboard (dataset-backed) → hook → one screen-flow wizard → seed.
32+
* Deliberately small so `pnpm dev:crm` boots fast for backend debugging.
4733
*
48-
* For a full enterprise reference (10+ objects, RAG, sharing rules,
49-
* etc.) see https://github.com/objectstack-ai/hotcrm
34+
* NOT a feature showcase: capability breadth (cubes, extensions, apis,
35+
* webhooks, portals, themes, reports, jobs, emails, automation variety)
36+
* lives in examples/app-showcase, whose coverage manifest enforces it.
37+
* For a full enterprise reference see https://github.com/objectstack-ai/hotcrm
5038
*/
5139
export default defineStack({
5240
manifest: {
@@ -58,12 +46,10 @@ export default defineStack({
5846
description: 'Minimal CRM workspace used by the framework to validate the metadata loading pipeline end-to-end.',
5947
},
6048

61-
// Auto-resolved by the CLI; `ui` enables the Studio shell, `automation` loads
62-
// AutomationServicePlugin + node packs so screen flows can execute, and
63-
// `approvals` loads ApprovalsServicePlugin so the `approval` flow node is
64-
// contributed to the engine (ADR-0019) — required for the discount-approval
65-
// flow to compile/register and to surface the node in the designer palette.
66-
requires: ['ui', 'automation', 'approvals'],
49+
// Auto-resolved by the CLI; `ui` enables the Studio shell, `automation`
50+
// loads AutomationServicePlugin + node packs so the convert-lead screen
51+
// flow can execute.
52+
requires: ['ui', 'automation'],
6753

6854
// Infrastructure
6955
datasources: [CrmDatasource, CrmAnalyticsDatasource],
@@ -85,28 +71,22 @@ export default defineStack({
8571

8672
// Data
8773
objects: Object.values(objects),
88-
objectExtensions: [ContactExtension],
8974

9075
// UI
9176
apps: Object.values(apps),
92-
portals: [CustomerPortal],
9377
views: Object.values(views),
9478
pages: Object.values(pages),
9579
dashboards: Object.values(dashboards),
9680
datasets: Object.values(datasets),
97-
reports: Object.values(reports),
9881
actions: Object.values(actions),
99-
themes: [CrmLightTheme, CrmDarkTheme],
10082

10183
// Logic
10284
hooks: allHooks,
103-
// ADR-0020: `workflows` retired — record state machines are now a
85+
// ADR-0020: `workflows` retired — record state machines are a
10486
// `state_machine` validation rule on the object (see
105-
// src/objects/opportunity.object.ts) and side-effecting automation is
106-
// modelled as Flows (high-value-deal, stale-opportunity in allFlows).
87+
// src/objects/opportunity.object.ts). One flow only: the convert-lead
88+
// screen wizard the smoke test drives.
10789
flows: allFlows,
108-
jobs: [LeadScoringJob, PipelineReportJob, RenewalSweepJob],
109-
emailTemplates: Object.values(emails),
11090

11191
// Security
11292
roles: [SalesRepRole, SalesManagerRole, FinanceApproverRole],
@@ -117,17 +97,6 @@ export default defineStack({
11797
WonDealActivitySharingRule,
11898
],
11999

120-
// API
121-
apis: [PipelineSummaryEndpoint, LeadConvertEndpoint, MarketingWebhookEndpoint],
122-
webhooks: [OpportunityChangedWebhook, DealWonSlackWebhook],
123-
124-
// Data Extensions
125-
mappings: [LeadCsvImportMapping, ContactJsonSyncMapping],
126-
analyticsCubes: [PipelineCube, LeadFunnelCube],
127-
128-
// Integrations
129-
connectors: [HubSpotConnector, SlackConnector],
130-
131100
// Seed data
132101
data: CrmSeedData,
133102
});
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
22

33
export { ConvertLeadAction } from './convert-lead.action.js';
4-
export { ParkLeadAction } from './park-lead.action.js';

examples/app-crm/src/actions/park-lead.action.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

examples/app-crm/src/analytics/crm.cube.ts

Lines changed: 0 additions & 122 deletions
This file was deleted.

examples/app-crm/src/api/crm-endpoints.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)