Skip to content

Ship local task demo workflow#19

Merged
cuevaio merged 11 commits into
mainfrom
issue-9-task-manager-demo
Jun 1, 2026
Merged

Ship local task demo workflow#19
cuevaio merged 11 commits into
mainfrom
issue-9-task-manager-demo

Conversation

@cuevaio
Copy link
Copy Markdown
Owner

@cuevaio cuevaio commented Jun 1, 2026

Summary

  • seed a demoable /task WhatsApp workflow that extracts structured task data, creates a local task row, and dry-runs a quoted confirmation
  • add deterministic dry-run Generate output so the local demo does not require AI credentials
  • polish Test Chat diagnostics for trigger match, block steps, Generate output, table patches, and outbound intents

Tests

  • bun test src/lib/workflow-runner.test.ts
  • bun test src/lib/workflow-runner.test.ts src/lib/local-tables.test.ts src/lib/workflow-triggers.test.ts src/lib/wasender-api.test.ts
  • bun run lint
  • bunx tsc --noEmit
  • bun run build

Closes #9

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

Reviewing PR metadata, current diff, prior comments, and CI status from GitHub without checking out or executing the PR branch.
The PR changes four files, with only the review workflow still in progress and GitGuardian passing; there are no prior inline review findings to carry forward. I’m checking the runner and table/template code around the changed behavior for correctness.
No blocking findings found.

[important] src/app/api/workflow-runner/route.ts:116 now uses the task-specific generateDryRunOutput for every dry-run Generate block. That adapter is hard-coded around /task prompts and task fields in src/lib/ai-generate.ts:105, so edited or newly added Generate blocks will get task-shaped outputs regardless of their prompt/schema. Consider scoping this adapter to the seeded demo workflow, or making the dry-run generator schema-driven enough to preserve arbitrary workflow testing.

Summary: CI currently shows GitGuardian passing and only this review workflow pending; no prior inline findings were present to re-check.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Existing persisted editor state can hide the new demo workflow for returning users.

Reviewed changes — This PR ships a local /task workflow demo that exercises Generate, local table writes, and dry-run WhatsApp confirmation behavior without external services.

  • Seed the task demo workflow — The initial WorkflowJson now extracts task data, creates a row in tasks, and produces a quoted reply intent.
  • Add deterministic dry-run Generate outputgenerateDryRunOutput lets /api/workflow-runner run Generate blocks in dry-run mode without AI credentials.
  • Improve Test Chat diagnostics — The page now displays trigger matching, block steps, Generate output, table patches, outbound intents, and recent local table rows.
  • Cover the demo pathsrc/lib/workflow-runner.test.ts adds an end-to-end dry-run test for extraction, row creation, table patching, and quoted replies.

⚠️ Returning browsers can keep the old workflow instead of the task demo

The new demo is only the default for a fresh localStorage state. Anyone who opened the previous editor keeps loading their saved normal.workflow-editor-shell.v1 workflow, so after deploy they can land on the old placeholder flow and never exercise the /task extraction/table/quoted-reply path unless they know to reset or clear storage.

Technical details
# Returning browsers can keep the old workflow instead of the task demo

## Affected sites
- `src/app/page.tsx:40` — The workflow storage key remains `normal.workflow-editor-shell.v1`.
- `src/app/page.tsx:73` — The seeded `initialWorkflow` now contains the new task demo, but `safeStoredWorkflow()` continues to prefer any existing v1 saved workflow.
- `src/app/page.tsx:961``resetWorkflow()` can reveal the new demo, but only if the user already knows to click it.

## Required outcome
- Returning users and reviewers with existing local editor state should see the shipped task demo, or the UI should make the migration/reset path explicit enough that the demo is not hidden.

## Suggested approach
Bump the workflow storage namespace for this seeded demo, or add a small migration/seed-version check that replaces only the old placeholder workflow while preserving intentionally edited workflows if that matters.

Pullfrog  | Fix it ➔View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review the PR using GitHub’s diff and metadata only, keeping the local checkout on the trusted base and avoiding any PR-head execution.
The current diff includes a follow-up commit after an earlier review. The previous inline comments endpoint returned no inline findings; prior review comments raised storage-state migration and task-specific dry-run generation, so I’m verifying whether those still apply in the latest diff.
No blocking findings found.

[important] src/app/page.tsx:40, src/app/page.tsx:599-615, src/app/page.tsx:687-693, src/app/page.tsx:961-965: Returning browsers can still keep the old placeholder workflow instead of the new task demo. This was previously raised and still applies: the storage key remains normal.workflow-editor-shell.v1, and safeStoredWorkflow() prefers any valid saved workflow before initialWorkflow. A returning user who previously opened the editor will not see the seeded /task -> Generate -> create_row -> quoted reply flow unless they manually reset. Consider bumping the storage namespace or adding a seed-version migration that replaces only the old placeholder workflow.

[important] src/app/api/workflow-runner/route.ts:117, src/lib/ai-generate.ts:105-129, src/lib/ai-generate.ts:132-144: Dry-run Generate is still globally task-shaped for every dry-run workflow. The route now passes generateDryRunOutput for all dry-run Generate blocks, but the adapter extracts /task, returns task defaults like status: "open", and for outputMode === "array" builds items from request.schema instead of request.elementSchema. This means edited/custom Generate blocks can get outputs that do not match their configured schema, especially array outputs. This was previously raised as task-specific dry-run behavior; the latest commit improves some schema handling but does not fully resolve it. Consider making the adapter mode/schema-driven, including elementSchema for arrays, or scoping the task-specific behavior to the seeded demo only.

CI context: GitGuardian is passing; the review workflow is still in progress, and no app CI check results were available from the inspected commit status endpoints.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ab43dcec7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

message: payload.message,
tableState: payload.tableState ?? null,
mode: payload.mode,
generate: payload.mode === "dry-run" ? generateDryRunOutput : undefined,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve Generate tool execution in dry runs

When the editor/API dry-runs any workflow containing a Generate block with toolsJson edges, this override routes the block through generateDryRunOutput, but that adapter returns a canned output without ever invoking request.tools[].execute. The runner’s tool-chain side effects (table writes and send intents behind tool:* edges) only occur when the Generate adapter calls those tool functions, so Test Chat dry-runs of existing tool-based workflows now silently skip those blocks and report a successful Generate step with no table patches or outbound intent. Consider falling back to the AI adapter when tools are present, or have the dry-run adapter execute a deterministic tool path rather than ignoring tools.

Useful? React with 👍 / 👎.

Comment thread src/lib/ai-generate.ts Outdated
Comment on lines +121 to +122
if (request.outputMode === "array") {
return { mode: "array", array: [taskObject] };
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor array element schemas in dry runs

When a dry-run Generate block is configured with outputMode: "array", this always returns an array containing the task object and ignores request.elementSchema entirely. For example, the editor’s default array schema is { "type": "string" }, so any downstream block that interpolates the generated array into a text/select column or expects strings will receive objects instead and can fail validation or show misleading dry-run output. Build the placeholder from the element schema (or at least return a schema-compatible primitive for primitive schemas) before exposing dry-run arrays.

Useful? React with 👍 / 👎.

Comment thread src/lib/ai-generate.ts Outdated
Comment on lines +143 to +144
) {
const sourceText = prompt.match(/\/task[^\n]*/i)?.[0] ?? `/task ${title}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return schema-compatible object fields

For dry-run Generate blocks using object mode with any schema outside the seeded task fields, this fills those properties with null. The editor’s own added Generate block seeds a required string response field, so switching it to object mode and then using {{blocks.<id>.output.object.response}} in a text/select table column causes the dry-run table action to reject the value even though a real structured generation should produce a string. Populate unknown properties according to their declared JSON-schema type instead of defaulting them to null.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues found in the new commit; the prior review's persisted-state concern still applies.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which generalizes deterministic dry-run Generate placeholders.

  • Generalized fallback dry-run textgenerateDryRunOutput now uses non-/task prompts instead of Untitled task and updates text-mode wording.
  • Filled schema-shaped object placeholders — Unknown object properties now receive type-shaped deterministic placeholder values, with additional name, text, and summary defaults.

Pullfrog  | Fix it ➔View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review PR 19 from GitHub’s diff and metadata only, then inspect the corresponding base-side files and nearby code without checking out or executing the PR branch.
The latest commit appears to address the earlier storage-version finding (v2) and the array/schema placeholder concerns from prior comments. I’m checking the runner’s Generate/tool execution path now because a prior inline comment flagged dry-run tools being bypassed.
No blocking findings found.

[important] src/app/api/workflow-runner/route.ts:117, src/lib/ai-generate.ts:105-127: The dry-run Generate adapter still bypasses request.tools, so Test Chat dry-runs of tool-based Generate workflows no longer execute tool:* edges. The runner only applies table patches/send intents from those tool chains when the adapter calls request.tools[].execute; generateDryRunOutput returns a canned output without doing that. This was previously raised inline and still applies. Consider falling back to the AI adapter when tools are present, or adding deterministic tool execution behavior to the dry-run adapter.

Summary: the earlier persisted-storage finding appears fixed by the v2 storage key, and the earlier schema/array placeholder findings appear addressed in the latest diff. CI context: GitGuardian passed; only this review workflow was still in progress, with no app CI statuses reported by the inspected endpoints.

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Dry-run array output can now diverge from the configured element schema.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which refreshes the seeded editor storage namespace and further generalizes deterministic dry-run Generate output.

  • Bumped the workflow storage keysrc/app/page.tsx now uses normal.workflow-editor-shell.v2, so returning browsers no longer keep loading the old saved workflow over the seeded /task demo.
  • Reworked dry-run object reusegenerateDryRunOutput now routes object, JSON, and array outputs through dryRunObject, adds a value fallback, and uses elementSchema for array mode.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using GPT𝕏

Comment thread src/lib/ai-generate.ts Outdated
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review the PR using GitHub CLI diff/metadata only, then inspect relevant base files and prior comments without checking out or executing PR code.
The current PR includes follow-up commits after earlier bot findings. Prior storage and schema/array issues appear addressed in the diff; I’m checking the Generate dry-run/tool path because the latest fix changes it to fall back to the AI adapter when tools exist.
No blocking findings found.

[important] src/lib/ai-generate.ts:125-130: Array dry-run output is still not schema-compatible for primitive elementSchemas. The editor seeds new Generate blocks with elementSchemaJson: { "type": "string" } in src/app/page.tsx:873-876, but generateDryRunOutput returns [dryRunObject(...)], and dryRunObject falls back to { value, sourceText } when there are no object properties. Downstream blocks testing output.array will see objects where a real array Generate would produce strings, which can make Test Chat diagnostics and table validation misleading. This was previously raised for array schemas; the current diff partially fixes object element schemas but not primitive ones. Consider adding a dryRunValueForSchemaProperty(request.elementSchema) path for non-object array elements and a regression test for the default string element schema.

CI context: GitGuardian passed; only the review workflow was still in progress, with no app CI statuses reported by the inspected endpoints.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The newest commit makes tool-enabled dry runs depend on the live AI adapter.

Reviewed changes — I reviewed the commit pushed while the previous review was being submitted, which changes generateDryRunOutput behavior for Generate blocks with inline tools.

  • Delegated tool-enabled dry runs to the AI SDKgenerateDryRunOutput now calls generateWithAiSdk whenever the request includes tools, while keeping deterministic output for tool-less Generate blocks.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using GPT𝕏

Comment thread src/lib/ai-generate.ts Outdated
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review the PR using GitHub’s diff and metadata as the source of truth, then validate any findings against the current base checkout without running PR code.
The PR has prior bot feedback on persisted storage, schema shaping, primitive arrays, and tool-enabled dry-runs. The current diff fixes the storage key and primitive array schema case, but the tool-enabled dry-run path still needs validation because the latest implementation delegates to the live AI adapter.
No blocking findings found.

[important] src/lib/ai-generate.ts:106-107, src/app/api/workflow-runner/route.ts:117: Tool-enabled dry runs still depend on the live AI adapter. The API installs generateDryRunOutput for every dry-run request, but that adapter delegates to generateWithAiSdk whenever request.tools is present. That means Test Chat dry-runs for workflows with toolsJson now require AI gateway credentials/network access, which breaks the local dry-run contract and can turn tool/table/send-message demo paths into Generate failures for users without AI configuration. This was previously raised in the PR comments and still applies in the current diff. Consider keeping tool-enabled dry-runs deterministic, returning a clear unsupported dry-run result, or making live-AI fallback explicit rather than automatic.

Previously raised storage-key and array primitive schema findings appear fixed in the latest diff. CI context: GitGuardian passed; no app CI statuses were reported by the inspected commit status endpoints, and only the review workflow was still in progress.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues found in 589383e; the earlier tool-enabled dry-run finding remains open.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which aligns deterministic dry-run array output with primitive element schemas.

  • Matched primitive array elementsgenerateDryRunOutput now uses dryRunArrayItem so primitive elementSchema values produce primitive dry-run items.
  • Covered the array regressionsrc/lib/workflow-runner.test.ts now asserts that { "type": "string" } resolves to a string array in dry-run mode.

Pullfrog  | Fix it ➔View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review this strictly from GitHub’s PR metadata and diff, without checking out or executing PR code. I’ll first collect the PR description, changed files, previous comments, and check status, then inspect only the relevant base files/dependencies for context.
The current head includes follow-up commits after earlier bot comments. The storage migration, schema-shaped fields, primitive array schema, and live-AI tool fallback issues appear to have been changed in the latest diff, so I’m validating the new deterministic tool-execution behavior and any side effects around runner/tool edges.
No blocking findings found.

[important] src/lib/ai-generate.ts:165-172: The latest dry-run tool fix now executes every configured Generate tool unconditionally. In live AI execution, tools are choices the model may call zero, one, or multiple times; here, every toolsJson entry triggers its tool:* edge and any local table/send-message side effects. Because Test Chat applies returned tablePatches to local state in src/app/page.tsx:1008-1009, a workflow with alternative tools like create/update/delete can mutate local rows in ways a real run would not. Consider making the deterministic dry-run tool selection explicit, limiting automatic execution to a single selected/demo tool, or avoiding side-effectful tool execution when multiple tools are configured.

Previously raised storage-key, schema-shaped object fields, primitive array elements, and live-AI fallback findings appear fixed in the current diff. CI context: GitGuardian passed; no app CI statuses were reported by the provided commit status endpoints, and only this review workflow was in progress.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which keeps tool-enabled Generate dry-runs local while preserving deterministic demo behavior.

  • Kept tool dry-runs localgenerateDryRunOutput now synthesizes schema-shaped tool inputs and executes configured tool chains without delegating to the live AI SDK.
  • Surfaced dry-run tool execution — Text dry-run output now names the locally executed tools, while object and JSON outputs can include toolResults for diagnostics.
  • Covered tool-enabled dry-run behaviorsrc/lib/workflow-runner.test.ts now exercises a Generate block with configured tools using generateDryRunOutput and no AI credentials.

Pullfrog  | View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review using GitHub CLI outputs only, avoiding checkout or execution of PR head code, then verify any prior findings against the current diff.
The current head includes follow-up commits for all earlier bot findings. Prior storage/schema/array/live-AI issues look addressed in the diff; I’m now checking whether the final deterministic tool behavior and demo workflow have any remaining correctness gaps.
No blocking findings found.

[important] src/app/page.tsx:104, src/app/page.tsx:126: The seeded Generate schema allows any string for status, but the Create Row block writes that value into a select column whose only valid options are open and done (src/app/page.tsx:67). Dry-run works because generateDryRunOutput hard-codes status: "open", but live generation can return values like pending or todo, causing the row creation to fail validation. Please constrain the schema with enum: ["open", "done"] or normalize the status before writing the row.

Previously raised storage-key, schema-field, primitive-array, and tool dry-run findings appear fixed in the current diff. CI context: GitGuardian passed; no app CI statuses were reported by the provided endpoints, and only the review workflow was still in progress.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c66ea8cf0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/ai-generate.ts Outdated

const object: Record<string, JsonValue> = {};
for (const [key, property] of Object.entries(properties)) {
object[key] = defaults[key] ?? dryRunValueForSchemaProperty(property);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor schema constraints before demo defaults

When a schema property has tighter constraints or a name that collides with these demo defaults, this picks the hard-coded value before inspecting the property schema. For example, an object schema with status: { type: "string", enum: ["todo", "done"] } followed by a Create Row into a select column with those options will dry-run as status: "open", causing the table action to reject the value even though real structured generation is constrained to the enum. Please derive the placeholder from enum/const/type constraints before applying defaults.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which narrows deterministic dry-run Generate tool execution to the first configured tool.

  • Limited deterministic tool executiongenerateDryRunOutput now invokes only tools[0] during dry-run mode instead of automatically executing every configured Generate tool.
  • Covered first-tool dry-run behaviorsrc/lib/workflow-runner.test.ts now asserts that a second configured dry-run tool is not executed implicitly.

Pullfrog  | View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll inspect the PR metadata, diff, prior comments, and check statuses using GitHub CLI only, keeping the trusted local checkout untouched.
The PR has several prior automated findings; most were addressed by follow-up commits. One current inline bot finding about schema constraints remains plausible, so I’m validating it against the latest head content and nearby runner behavior.
The first raw-content request used the wrong gh api parameter form and returned 404, not a PR-code issue. I’m retrying with the ref in the endpoint query.
No blocking findings found.

[important] src/lib/ai-generate.ts:192-214: The dry-run object generator still applies hard-coded demo defaults before honoring schema constraints. This was previously raised inline and still applies after the latest commit. For example, a schema field named status with enum: ["todo", "done"] will dry-run as "open", which can fail downstream select-column validation even though live structured generation would be constrained to the enum. Please derive placeholders from enum/const/type constraints before falling back to name-based demo defaults.

CI context: GitGuardian passed; no app CI statuses were reported by the inspected commit status endpoints, and only this review workflow was in progress.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which aligns the seeded task demo status schema with the local table’s select options.

  • Constrained task status outputsrc/app/page.tsx now declares the Generate schema’s status property as an enum of "open" or "done", matching the tasks table options used by the demo row write.

Verification: bun test src/lib/workflow-runner.test.ts passed.

Pullfrog  | View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review using GitHub’s PR diff and metadata only, keeping the trusted checkout on the base revision and avoiding any PR-head execution.
The current head has multiple follow-up commits after earlier automated findings. The visible latest diff addresses storage migration, primitive arrays, tool dry-runs, status enum, and schema-constraint ordering, so I’m checking for remaining issues around the runner/tool side effects and UI state updates.
No blocking findings found.

[important] src/lib/ai-generate.ts:128-133: Object-mode dry-runs with tools add a toolResults property that is not part of the configured object schema. Live Output.object({ schema }) should return only schema-shaped output, so downstream blocks that use the whole object, for example valuesJson: "{{blocks.generate.output.object}}" into a local table whose columns match the schema, can fail in Test Chat with an unexpected toolResults column even though the live structured output would be valid. Consider keeping diagnostics outside the generated object payload, or only attaching them for json/text diagnostics.

Previously raised storage-key, primitive array, live-AI tool fallback, status enum, and schema-constraint findings appear fixed in the current diff. CI context: GitGuardian passed; no app CI statuses were reported by the provided commit status endpoints, and only this review workflow was in progress.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which makes deterministic dry-run Generate output honor explicit schema constraints before demo defaults.

  • Honored schema constraints in dry-runsgenerateDryRunOutput now returns JSON-compatible const and first enum values before falling back to seeded demo defaults or type-shaped placeholders.
  • Covered enum precedencesrc/lib/workflow-runner.test.ts now asserts that an enum-constrained status field returns the schema value instead of the built-in task demo default.

Verification: bun test src/lib/workflow-runner.test.ts passed.

Pullfrog  | View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review the PR using GitHub’s diff and metadata only, keeping the local checkout on the trusted base revision and avoiding execution of PR code.
The latest PR head has follow-up commits addressing most prior automated findings. I’m validating the remaining dry-run Generate/tool behavior against the runner and local-table code paths before deciding whether anything still applies.
No blocking findings found.

[important] src/lib/ai-generate.ts:212-215, src/lib/ai-generate.ts:260-265: Dry-run schema shaping still stops at the first nested object/array. For a schema like { assignee: { type: "object", required: ["name"], properties: { name: { type: "string" } } } }, dry-run output becomes { assignee: {} }, while live structured generation should satisfy assignee.name. Downstream templates such as {{blocks.generate.output.object.assignee.name}} can fail in Test Chat even though the live schema is valid. Consider making dryRunValueForSchemaProperty recurse into object properties and array items, and add a regression test for nested required fields.

Previously raised findings around persisted storage, primitive arrays, tool dry-runs, status enums, schema constraints, and object-mode toolResults appear fixed in the current diff. CI context: GitGuardian passed; no app CI statuses were reported by the inspected endpoints, and only this review workflow was still in progress.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — I reviewed the commit pushed after the prior Pullfrog review, which keeps dry-run Generate object output aligned with the configured schema when tools run.

  • Preserved schema-shaped object outputgenerateDryRunOutput now returns only the generated object for object mode while still executing configured dry-run tools locally for side effects.
  • Covered tool-enabled object dry-runssrc/lib/workflow-runner.test.ts now asserts that object output with tools stays shaped like the requested schema instead of adding diagnostic toolResults.

Verification: bun test src/lib/workflow-runner.test.ts passed.

Pullfrog  | View workflow run | Using GPT𝕏

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
@opencode-agent
Copy link
Copy Markdown
Contributor

opencode-agent Bot commented Jun 1, 2026

I’ll review the PR using GitHub CLI only for the untrusted head diff and metadata, then inspect only relevant checked-out base files for context.
Prior inline comments covered dry-run tool execution, array primitive schemas, schema-shaped object fields, and enum constraints. The current diff includes tests and code changes that appear intended to address those, so I’m checking the current implementation for remaining edge cases rather than repeating fixed findings.
The latest head has follow-up commits for the earlier storage, schema constraints, object output, and nested schema issues. I’m fetching the changed file text via GitHub’s contents API only for line-number accuracy; I’m not checking out or running the PR branch.
No blocking findings found.

[suggestion] src/lib/ai-generate.ts:163-171: Dry-run Generate executes only tools[0]. That avoids the earlier issue of firing every tool, but workflows with multiple toolsJson entries still have no way to dry-run a non-first tool:* edge. Consider making the selected dry-run tool explicit in the editor/API, or documenting that only the first tool path is exercised.

Previously raised findings around storage migration, primitive array schemas, live-AI fallback, enum constraints, object-mode toolResults, and nested schema shaping appear fixed in the current diff.

CI context: GitGuardian passed; only this review workflow was still in progress, and no app CI check results were reported by the provided status endpoints.

Copy link
Copy Markdown

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Nested array dry-run placeholders can still lose command-derived values.

Reviewed changes — I reviewed the new commit since the prior Pullfrog review, which extends dry-run schema placeholders into nested object and array properties.

  • Recursed nested placeholdersgenerateDryRunOutput now fills nested object properties and array schema properties instead of returning empty objects or arrays.
  • Covered nested schema outputsrc/lib/workflow-runner.test.ts now asserts nested object and enum-constrained array placeholders in object output mode.

Verification: bun test src/lib/workflow-runner.test.ts passed.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using GPT𝕏

Comment thread src/lib/ai-generate.ts

if (type === "array") {
const items = (property as Record<string, unknown>).items;
const item = dryRunValueForSchemaProperty(items);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Nested array properties lose the extracted command text here because items is evaluated with the helper's default fallback, so labels: { type: "array", items: { type: "string" } } produces ["Dry-run value"] while top-level primitive arrays produce ["buy milk"]. That keeps the new recursive path from matching the deterministic behavior callers get elsewhere and can break downstream templates or local table writes that read those nested array values.

Suggested change
const item = dryRunValueForSchemaProperty(items);
const item = dryRunValueForSchemaProperty(items, fallbackText);

@cuevaio cuevaio merged commit 83cd4b5 into main Jun 1, 2026
3 checks passed
@cuevaio cuevaio deleted the issue-9-task-manager-demo branch June 1, 2026 09:57
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c939a0e05a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/ai-generate.ts
Comment on lines +212 to +215
object[key] =
dryRunSchemaConstraintValue(property) ??
defaults[key] ??
dryRunValueForSchemaProperty(property, extractedText);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate demo defaults against the schema type

When a schema property name matches one of these demo defaults, the dry-run output uses the default without checking the property's declared type. For example, an object-mode Generate with title: { type: "number" } followed by a Create Row into a number column will dry-run title as the extracted string (e.g. "buy milk"), and isValueValidForColumn then rejects the table action even though the schema says the generated value should be numeric. Please only apply these name-based defaults when they satisfy the property schema, otherwise fall through to dryRunValueForSchemaProperty.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship task-manager demo workflow and debug UX polish

1 participant