fix(tables): right-align run/stop in embedded toolbar; workflow cells format like normal cells#4806
Conversation
Add a right-aligned `trailing` slot to ResourceOptionsBar and move the embedded mothership table's run/stop control into it, so Filter + Sort stay left-aligned and run/stop sits opposite on the right. No-op for the search-bearing consumers (logs, resource list), which don't pass `trailing`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Workflow-output columns short-circuited in resolveCellRender and rendered their value as plain text, so a sim-resource URL / external URL / JSON / date produced by a workflow never got the chip, favicon link, or typed formatting a normal cell gets. Factor value formatting into a shared `resolveValueKind` helper used by both the workflow-value branch and the plain-cell branch; the workflow branch keeps the typewriter reveal for plain streaming text via a `typewriter` flag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview In Reviewed by Cursor Bugbot for commit d0ea8cf. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR delivers two polishing fixes on top of the embedded table view: the run/stop control is repositioned to the far-right of the options bar via a new
Confidence Score: 4/5Safe to merge — both changes are self-contained with no mutations to shared state or API contracts. The workflow-output formatter correctly unifies plain-cell and workflow-output formatting while preserving typewriter animation for plain strings. The two observations do not affect any current code paths. cell-render.tsx is worth a second look if workflow columns with non-string types are expected to auto-detect URLs in their output values. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[resolveCellRender] --> B{column.workflowGroupId?}
B -- Yes --> C{isEmpty?}
C -- No: value present --> D[resolveValueKind\ntypewriter: true]
C -- Yes: empty/null --> E{inFlight / waiting / etc.}
E --> F[running / pending / queued / cancelled / error / empty]
B -- No: plain cell --> G[resolveValueKind\ntypewriter: false]
D --> H{column.type?}
G --> H
H -- boolean --> I[kind: boolean]
H -- null/undefined --> J[kind: empty]
H -- json --> K[kind: json]
H -- date --> L[kind: date]
H -- string --> M{sim-resource URL?}
M -- Yes --> N[kind: sim-resource chip]
M -- No --> O{external URL?}
O -- Yes --> P[kind: url favicon link]
O -- No --> Q{typewriter flag?}
H -- other --> Q
Q -- true --> R[kind: value animated]
Q -- false --> S[kind: text static]
|
…of column type Workflow output columns default to `json` (columnTypeForLeaf), so routing their values through the type-based formatter (a) gated chip/URL promotion behind `column.type === 'string'` — a URL produced by a json-typed output never became a chip — and (b) JSON.stringify'd plain string values, adding quotes and losing the typewriter reveal. Detect links (sim-resource chip / favicon URL) on the value string directly for workflow outputs, falling back to the plain `value` kind; plain cells keep the type-based formatting. Addresses Greptile P2 on #4806. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two small follow-ups to the embedded (mothership) table view, on top of the now-merged #4789.
1. Toolbar alignment
In the embedded table resource view, Filter + Sort are left-aligned and the run/stop control is right-aligned (opposite ends of the same bar). Implemented by adding a right-aligned
trailingslot toResourceOptionsBar(pushed right via the existingjustify-between) and moving the run/stop control there from the leftextrascluster. No-op for the other consumers (logs, resource list) — they pass asearchsection and notrailing.2. Workflow-output cells format like normal cells
Workflow-output columns short-circuited in
resolveCellRenderand rendered their value as plain text, so a value produced by a workflow never got the resource chip / favicon URL link / JSON / date / boolean formatting a normal cell gets (this is why a…/workspace/{id}/w/{id}URL in a workflow column didn't render as a chip).Value formatting is now factored into a shared
resolveValueKind(value, column, workspaceId, { typewriter })helper used by both the workflow-value branch and the plain-cell branch:typewriterflag (valuekind for workflow outputs,textfor plain cells).Test
https://www.sim.ai/workspace/{currentWsId}/w/{workflowId}URL as a workflow output value → renders the workflow's colored-square chip. External URL → favicon link.🤖 Generated with Claude Code