Bug
isValueEmpty for tables only checks rows.length > 0, so tables with
pre-seeded template/hint rows (e.g., | EPS | | | | |) are classified as
"answered." The fill harness then never generates an issue for these fields,
and the LLM never attempts to fill them.
Reproduction
Given a form with a table field containing template rows:
{% field kind="table" id="earnings_results" label="Earnings Results"
columnIds=["metric", "actual", "estimate", "surprise", "notes"]
columnTypes=["string", "number", "number", "string", "string"] %}
| Metric | Actual | Estimate | Surprise | Notes |
| ------- | ------ | -------- | -------- | ----- |
| EPS | | | | |
| Revenue | | | | |
{% /field %}
- Parse the form and check
formProgress — the earnings_results field
shows as "answered" despite all data cells being empty
- Run a fill — the LLM never receives an issue for this field and never
attempts to fill it
- Result: all cells remain empty, but progress reports the field as filled
Root cause
// parseFields.ts:93-94
case 'table':
return (value.rows?.length ?? 0) === 0;
This cascades through:
isValueEmpty → false (template rows count as rows)
createFieldResponse → { state: "answered" }
addOptionalUnansweredIssues → skips field (not "unanswered")
- LLM never sees the table → all cells remain empty/skipped
Impact
Any form with pre-seeded table rows gets 100% empty tables that
formProgress reports as "filled." Silent failure, no errors or warnings.
Suggested fix
isValueEmpty should check whether rows contain actual data, not just
whether rows exist:
case 'table': {
const rows = value.rows ?? [];
if (rows.length === 0) return true;
return rows.every(row =>
row.cells.every(cell => cell.state === 'skipped' || cell.state === 'empty')
);
}
Ref: dxdt-labs/ai-trade-arena#381
Bug
isValueEmptyfor tables only checksrows.length > 0, so tables withpre-seeded template/hint rows (e.g.,
| EPS | | | | |) are classified as"answered." The fill harness then never generates an issue for these fields,
and the LLM never attempts to fill them.
Reproduction
Given a form with a table field containing template rows:
{% field kind="table" id="earnings_results" label="Earnings Results" columnIds=["metric", "actual", "estimate", "surprise", "notes"] columnTypes=["string", "number", "number", "string", "string"] %} | Metric | Actual | Estimate | Surprise | Notes | | ------- | ------ | -------- | -------- | ----- | | EPS | | | | | | Revenue | | | | | {% /field %}formProgress— theearnings_resultsfieldshows as "answered" despite all data cells being empty
attempts to fill it
Root cause
This cascades through:
isValueEmpty→false(template rows count as rows)createFieldResponse→{ state: "answered" }addOptionalUnansweredIssues→ skips field (not "unanswered")Impact
Any form with pre-seeded table rows gets 100% empty tables that
formProgressreports as "filled." Silent failure, no errors or warnings.Suggested fix
isValueEmptyshould check whether rows contain actual data, not justwhether rows exist:
Ref: dxdt-labs/ai-trade-arena#381