Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5003578
Update URLResolver to reference new controller for workflow-related a…
labkey-susanh Oct 20, 2025
4c32c08
@labkey/components v6.64.4-moveWorkflowCode.0
labkey-susanh Oct 20, 2025
5a40f8d
Merge remote-tracking branch 'origin/develop' into fb_moveWorkflowCode
labkey-susanh Oct 20, 2025
aacc516
merge from develop and update package versions
labkey-susanh Oct 20, 2025
9f0a48d
Revert URL update (for now)
labkey-susanh Oct 22, 2025
bd31b15
v6.65.2-moveWorkflowCode.1
labkey-susanh Oct 22, 2025
ea92dcb
Merge from develop
labkey-susanh Oct 22, 2025
bcc710d
merge from develop and add @labkey/components v6.66.1-moveWorkflowCode.2
labkey-susanh Oct 24, 2025
7bf578d
Merge remote-tracking branch 'origin/develop' into fb_moveWorkflowCode
labkey-susanh Oct 29, 2025
632c094
Merge remote-tracking branch 'origin/develop' into fb_moveWorkflowCode
labkey-susanh Oct 29, 2025
503dd10
merge from develop
labkey-susanh Oct 29, 2025
1433a33
Merge from develop and @labkey/components v6.68.2-moveWorkflowCode.3
labkey-susanh Nov 3, 2025
dafd5ab
Merge from develop
labkey-susanh Nov 6, 2025
8515b3d
merge from develop
labkey-susanh Nov 7, 2025
6f1b6ac
Begin addition of tables in Workflow schema
labkey-susanh Nov 8, 2025
00fdaae
merge from develop and update package version
labkey-susanh Nov 8, 2025
6e9bbdd
Remove unused TASK_DEFINITIONS
labkey-susanh Nov 9, 2025
c41ed38
Add JOB_INPUT_SAMPLES query
labkey-susanh Nov 10, 2025
99dbc11
@labkey/components v6.70.4-moveWorkflowCode.4
labkey-susanh Nov 10, 2025
06152b3
release note update
labkey-susanh Nov 11, 2025
6f40677
Add explicit JobTemplate table
labkey-susanh Nov 12, 2025
0d37acd
Merge remote-tracking branch 'origin/develop' into fb_moveWorkflowCode
labkey-susanh Nov 12, 2025
56a3a60
@labkey/components v6.70.4-moveWorkflowCode.5
labkey-susanh Nov 12, 2025
8346515
remove legacy job schema/query references from WORKFLOW const
cnathe Nov 13, 2025
f70af9d
remove ExperimentRunResolver
cnathe Nov 13, 2025
a45b6a4
6.70.4-moveWorkflowCode.6
cnathe Nov 13, 2025
bacc368
Merge from develop and update package versions
labkey-susanh Nov 14, 2025
6c4e7ba
URLResolver.ts update for samplemanager-downloadAttachments -> workfl…
cnathe Nov 14, 2025
980131a
6.70.6-moveWorkflowCode.7
cnathe Nov 14, 2025
0df5767
Merge from develop
labkey-susanh Nov 19, 2025
eee93b8
Merge from develop
labkey-susanh Nov 21, 2025
f076dbd
workflow events have transaction ids
labkey-susanh Nov 21, 2025
6c41461
@labkey/components v6.72.1-moveWorkflowCode.8
labkey-susanh Nov 21, 2025
220a53b
Add schema constant for workflow.Action
labkey-susanh Nov 24, 2025
480a04a
v6.72.1-moveWorkflowCode.9
labkey-susanh Nov 24, 2025
3909772
Merge remote-tracking branch 'origin/develop' into fb_moveWorkflowCode
labkey-susanh Nov 25, 2025
f5a9432
release date and version
labkey-susanh Dec 1, 2025
53a7768
v7.0.0
labkey-susanh Dec 1, 2025
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 packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "6.72.1",
"version": "7.0.0",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
7 changes: 7 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version 7.0.0
*Released*: 1 December 2025
- Updates for new Workflow implementation
- Update URLResolver to reference new controller for workflow-related actions
- add `WORKFLOW` schema and queries and remove legacy job schema/query references
- remove ExperimentRunResolver

### version 6.72.1
*Released*: 25 November 2025
- QueryColumn to only apply displayWidth for multiLine columns
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ import {
JavaDocsLink,
SAMPLE_IMPORT_TOPIC,
} from './internal/util/helpLinks';
import { ExperimentRunResolver, ListResolver } from './internal/url/AppURLResolver';
import { ListResolver } from './internal/url/AppURLResolver';
import { NOT_ANY_FILTER_TYPE } from './internal/url/NotAnyFilterType';
import { genCellKey, incrementRowCountMetric, parseCellKey } from './internal/components/editable/utils';
import { EditableGrid } from './internal/components/editable/EditableGrid';
Expand Down Expand Up @@ -1268,7 +1268,6 @@ export {
ExpandableContainer,
ExpandableFilterToggle,
EXPERIMENT_AUDIT_EVENT,
ExperimentRunResolver,
ExpirationDateColumnRenderer,
EXPORT_TYPES,
ExtendedMap,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/internal/AssayDefinitionModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class AssayDefinitionModel extends ImmutableRecord({
// 44339: the SourceSamples custom query is backed by exp.materials
const isTargetAllSamples =
targetSQ.isEqual(SCHEMAS.SAMPLE_MANAGEMENT.SOURCE_SAMPLES) ||
targetSQ.isEqual(SCHEMAS.SAMPLE_MANAGEMENT.INPUT_SAMPLES_SQ) ||
targetSQ.isEqual(SCHEMAS.WORKFLOW.JOB_INPUT_SAMPLES) ||
(isPicklist && targetSQ.hasSchema(SCHEMAS.PICKLIST_TABLES.SCHEMA));
const findLookup = (col: QueryColumn): boolean => {
if (col.isLookup()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const ASSAY_RESULT_AUDIT_QUERY: AuditQuery = {
};
export const WORKFLOW_AUDIT_QUERY: AuditQuery = {
hasDetail: true,
hasTransactionId: true,
label: 'Sample Workflow Events',
value: 'SamplesWorkflowAuditEvent',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export function isAllSamplesSchema(schemaQuery: SchemaQuery): boolean {
if (lcSchemaName === SCHEMAS.SAMPLE_MANAGEMENT.SCHEMA) {
return (
lcQueryName === SCHEMAS.SAMPLE_MANAGEMENT.SOURCE_SAMPLES.queryName.toLowerCase() ||
lcQueryName === SCHEMAS.SAMPLE_MANAGEMENT.INPUT_SAMPLES_SQ.queryName.toLowerCase()
lcQueryName === SCHEMAS.WORKFLOW.JOB_INPUT_SAMPLES.queryName.toLowerCase()
);
}

Expand Down
14 changes: 12 additions & 2 deletions packages/components/src/internal/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,17 @@ export const SAMPLE_MANAGEMENT = {
SAMPLE_TYPE_INSIGHTS: new SchemaQuery(SAMPLE_MANAGEMENT_SCHEMA, 'SampleTypeInsights'),
SAMPLE_STATUS_COUNTS: new SchemaQuery(SAMPLE_MANAGEMENT_SCHEMA, 'SampleStatusCounts'),
SOURCE_SAMPLES: new SchemaQuery(SAMPLE_MANAGEMENT_SCHEMA, 'SourceSamples'),
INPUT_SAMPLES_SQ: new SchemaQuery(SAMPLE_MANAGEMENT_SCHEMA, 'InputSamples'),
JOBS: new SchemaQuery(SAMPLE_MANAGEMENT_SCHEMA, 'Jobs'),
};

// WORKFLOW
export const WORKFLOW_SCHEMA = "workflow";
export const WORKFLOW = {
SCHEMA: WORKFLOW_SCHEMA,
JOB: new SchemaQuery(WORKFLOW_SCHEMA, 'Job'),
ACTION: new SchemaQuery(WORKFLOW_SCHEMA, 'Action'),
JOB_TEMPLATE: new SchemaQuery(WORKFLOW_SCHEMA, 'JobTemplate'),
JOB_PRIORITY: new SchemaQuery(WORKFLOW_SCHEMA, 'WorkflowJobPriority'),
JOB_INPUT_SAMPLES: new SchemaQuery(WORKFLOW_SCHEMA, 'JobInputSamples'),
};

// STUDY
Expand Down Expand Up @@ -178,4 +187,5 @@ export const SCHEMAS = {
PICKLIST_TABLES,
PLATE_TABLES,
SAMPLE_MANAGEMENT,
WORKFLOW,
};
23 changes: 1 addition & 22 deletions packages/components/src/internal/url/AppURLResolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { registerDefaultURLMappers } from '../test/testHelpers';

import { QueryInfo } from '../../public/QueryInfo';

import { ExperimentRunResolver, ListResolver } from './AppURLResolver';
import { ListResolver } from './AppURLResolver';
import { URLResolver } from './URLResolver';
import { AppURL } from './AppURL';
import { encodeListResolverPath } from './utils';
Expand Down Expand Up @@ -445,25 +445,4 @@ describe('App Route Resolvers', () => {
}),
]);
});

test('Should resolve /rd/run/### routes', () => {
const jobsResolver = new ExperimentRunResolver(new Set([4, 5, 10]));

// test regex
expect(jobsResolver.matches(undefined)).toBe(false);
expect(jobsResolver.matches('/rd/samples/4')).toBe(false);
expect(jobsResolver.matches('/rd/run/b')).toBe(false);
expect(jobsResolver.matches('/a/rd/run/b')).toBe(false);
expect(jobsResolver.matches('/rd/run/4')).toBe(true);
expect(jobsResolver.matches('/rd/run/141345')).toBe(true);

return Promise.all([
jobsResolver.fetch(['rd', 'runs', 'notanumber']).then(result => {
expect(result).toBe(undefined);
}),
jobsResolver.fetch(['rd', 'runs', 4]).then((result: AppURL) => {
expect(result.toString()).toBe('/workflow/4');
}),
]);
});
});
57 changes: 1 addition & 56 deletions packages/components/src/internal/url/AppURLResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { Map } from 'immutable';
import { Filter } from '@labkey/api';

import { SAMPLE_MANAGEMENT, SCHEMAS } from '../schemas';
import { SCHEMAS } from '../schemas';

import { selectRows } from '../query/selectRows';
import { caseInsensitive } from '../util/utils';
Expand Down Expand Up @@ -98,58 +98,3 @@ export class ListResolver implements AppRouteResolver {
return undefined;
}
}

/**
* Resolves experiment runs to workflow jobs if appropriate
* /rd/run/14/... -> /workflow/14/...
* If this doesn't correspond to a job, the link won't resolve.
*
* Ideally we would resolve to the original URL if it's not a job, but since that's a link out to LKS
* it's not currently supported by AppRouteResolvers. Alternatively, and perhaps more ideally, we'd resolve
* to the lineage page for a sample, but the URL here doesn't have any info about the related entity.
*/
export class ExperimentRunResolver implements AppRouteResolver {
jobs: Set<number>; // set of rowIds that are jobs

constructor(jobs?: Set<number>) {
this.jobs = jobs !== undefined ? jobs : new Set();
}

async fetch(parts: any[]): Promise<AppURL> {
const rowIdIndex = 2;
const rowId = parseInt(parts[rowIdIndex], 10);

if (isNaN(rowId)) {
// skip it
return undefined;
}
if (this.jobs.has(rowId)) {
// resolve it
return AppURL.create(WORKFLOW_KEY, rowId);
}
try {
const result = await selectRows({
schemaQuery: SAMPLE_MANAGEMENT.JOBS,
filterArray: [Filter.create('RowId', rowId)],
columns: 'RowId',
});

if (result.rows.length > 0) {
// resolve it
this.jobs.add(rowId);
return AppURL.create(WORKFLOW_KEY, rowId);
} else {
return AppURL.create('rd', 'assayrun', rowId);
}
} catch (e) {
// skip it
}

// skip it
return undefined;
}

matches(route: string): boolean {
return /\/rd\/run\/\d+$/.test(route);
}
}
2 changes: 1 addition & 1 deletion packages/components/src/internal/url/URLResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ export class URLResolver {
url = url.substring(0, index);
}
return row.set('url', this.mapURL({ url, row }));
} else if (url.indexOf('samplemanager-downloadAttachments') >= 0) {
} else if (url.indexOf('workflow-downloadAttachments') >= 0) {
return row.set('url', this.mapURL({ url, row }));
} else if (url.indexOf('notebook') >= 0) {
return row.set('url', this.mapURL({ url, row }));
Expand Down