Repository navigation
Milab 7197 add filtered inputs - #27
Conversation
| seqTb = pframes.tableBuilder("tsv").setJoinMode("full") | ||
| nSeqColumns := 0 | ||
| addSeqColumn = func(column, opts) { | ||
| seqTb.addPrimary("col" + string(nSeqColumns), { | ||
| __isPrimaryRef: "v1", | ||
| column: column, | ||
| filter: filterColumn | ||
| }, opts) | ||
| nSeqColumns += 1 |
There was a problem hiding this comment.
The new filtered workflow has no test that selects a subset. The existing idle smoke test never reaches this branch, so it cannot catch excluded entities leaking in or selected entities being dropped.
Add a small fixture with selected and excluded entities. Check output membership, a subset-only summary, and pl7.app/inputSubset. Include an entity missing a chain or region to cover the new full join.
Prompt To Fix With AI
This is a comment left during a code review.
Path: workflow/src/main.tpl.tengo
Line: 217-225
Comment:
**Subset runs lack tests**
The new filtered workflow has no test that selects a subset. The existing idle smoke test never reaches this branch, so it cannot catch excluded entities leaking in or selected entities being dropped.
Add a small fixture with selected and excluded entities. Check output membership, a subset-only summary, and `pl7.app/inputSubset`. Include an entity missing a chain or region to cover the new full join.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| ) | ||
| : []; | ||
| return createPFrameForGraphs(ctx, [...pCols, ...upstreamMeta]); | ||
| return ctx.createPFrame([...pCols, ...upstreamMeta]); |
There was a problem hiding this comment.
We're losing linkered columns (e.g. cluster size);
getAnchoredPColumns dosn't add them (createPFrameForGraphs did it); probably discovery api should be used here; Claude comment:
It can be done, and it's the better direction: getAnchoredPColumns is on the deprecation list in the pframes-api redesign. Everything needed is exported from @platforma-sdk/model 1.85, which the block uses:
ColumnsCollection, DataColumn, collectLinkerColumns, hitQualifications, extractPObjectId. The pattern to copy is graph-maker's discoverPFrameColumns
(core/visualizations/packages/graph-maker/src/utils/discoverPFrameColumns.ts:400-410). It isn't exported, and the block is on graph-maker 1.4.8 anyway, so it would be inlined:
const recipes = ColumnsCollection(["result_pool"], { ctx /* check form — see below */ })
.discover({ anchors: { main: anchorSpec }, mode: "enrichment", maxHops: 2 })
.getColumns();
for (const r of recipes) {
if (isOwnExport(r.getSpec())) continue; // same trace check as today
if (hitQualifications(r).length > 0) continue; // see caveat 2
add(materialize(r)); // DataColumn.fromId(extractPObjectId(r.id)).getData()
for (const l of collectLinkerColumns(r, { ctx })) add(materialize(l));
}
return ctx.createPFrame([...pCols, ...upstream]);
There was a problem hiding this comment.
Agreed; now commit f2d9a9c switches to the discoverPFrameColumns pattern.


Confidence Score: 5/5
The PR appears safe to merge, with a non-blocking gap in tests for subset runs.Fix with agent prompt
Summary
Adds optional subset selection before sequence analysis. The latest change builds the graph frame directly to avoid duplicate property choices.
Important touched types:
BlockParams: Settings supplied when creating a block. Adds optionalfilterRef.BlockData: Saved inputs and view state. Stores the selected subset infilterRef.BlockArgs: Values sent to the workflow. AddsinputFilter, the subset's encoded column ID.DatasetOption: A dataset choice and its available filters. Now shapesinputOptions.DatasetSelection: The dataset and filter selected in the UI. Now connectsPlDatasetSelectorto saved inputs.PFrameHandle: A reference to columns available to graphs. The latest change creates it directly withctx.createPFrame.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Dataset selection] --> B{Subset selected?} B -->|No| C[All input sequences] B -->|Yes| D[Sequences from selected entities] C --> E[Compute properties and summaries] D --> E E --> F[Table and graphs] E --> G[Published properties]Reviews (2) · Last reviewed commit: "MILAB-7197: build the plot frame from ow..." · Reviewed by Greptile