Repository navigation
Fix Google Sheets rows that lose cells or stop at 100 rows, and the Decision node's default state - #1090
Merged
Conversation
Collaborator
|
Thanks for this batch! Max rows and the Decision default state look good. Before we can merge, a few changes:
Thanks again 🙏 |
readRange and the Google Sheets Trigger built each row as
{header title: cell}. Two columns titled "Notes" kept only the last,
every column without a title shared the key "", and a column past the
header row's end (Sheets drops trailing empty header cells) was dropped.
The column picker already named a blank-titled column by its letter.
One helper now keys the columns for all three: the title, the column
letter when there is none, and _2, _3 for a repeated title, never
taking another column's real title.
The docs, the DSL prompt and the editor ("Max rows (0 = all)", shown as
0 when unset) say 0 reads every row. The node turned a number 0, a
cleared field and a missing field into 100, so rows after the 100th
were cut off silently; only the text "0" read them all. Those now read
every row too.
The docs and the DSL prompt give state the default $input.text, and the canvas sets it on new nodes, but the handler sent the field as it was: a node built without it, as the AI builder may write one, sent "state": null and the model had nothing to read. An unset state now reads $input.text; an explicit value is sent as written.
Renaming columns changed keys workflows read and names Heym Work stores from the columns endpoint. Rows now keep main's keys with the same value and order (each title holds its column's cell, a repeated title the last such column, blank titles ""), and after rowIndex add the cells no title holds (an earlier column with a repeated or blank title, a column past the header row's end) keyed by the column letter, or B_2 when taken. The columns endpoint and the trigger's changed_columns are as on main. The node pages and the DSL describe the rule; a test checks that every key main returns keeps its value and order.
ersinkoc
force-pushed
the
fix/batch-ab
branch
from
November 22, 2026 14:12
4e451ab to
26f2011
Compare
Contributor
Author
|
Thanks, and noted on the scope (UI, Heym Work or a node only). Done:
The branch is rebased on |
Collaborator
|
Thanks for the quick update! All four points are in, and every key
Thanks again 🙏 |
row_object recomputed the widest row for every row of a trigger poll, so a poll grew with the square of the rows (3.2 s for 10,000 rows against 0.12 s on main). build_snapshot now computes the width once and row_object reads it (0.13 s). Every blank-titled column also gets its letter key, keeping "": the columns endpoint names such a column by its letter and Heym Work saves that name, but with one blank title the row only had "".
Contributor
Author
|
Thanks, both fixed in
Full suite: 9848 passed. |
Collaborator
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three fixes: two Google Sheets reads and the Decision node's default state. The last two commits answer the review (see "Review changes"). I ran step 3 against
main(deb260a) and against this branch, on two local instances. I have no Google account connected here, so the two Sheets fixes are shown with tests against a mocked Sheets API.The steps share this setup:
1. Google Sheets rows lose cells under repeated and blank titles, and past the header
readRange(with "Use first row as header") and the Google Sheets Trigger build each row as{title: cell}. A repeated title keeps only the last such column, every column without a title shares the key"", and a column past the end of the header row is dropped (the Sheets API leaves trailing empty cells out of the header row). For a headerName, "", Notes, Notesand the rowAda, vip, called, emailed, late,mainreturns{"Name": "Ada", "": "vip", "Notes": "emailed", "rowIndex": 2}:calledandlateare gone.Rows now keep every key
mainreturns, with the same value and order, and afterrowIndexadd the cells no title holds, keyed by the column letter (orC_2when that key is taken). Every blank-titled column also gets its letter key (keeping""), since the columns endpoint names it by its letter and Heym Work saves that name. The same row reads{"Name": "Ada", "": "vip", "Notes": "emailed", "rowIndex": 2, "B": "vip", "C": "called", "E": "late"}. The columns endpoint and the trigger'schanged_columnsare unchanged. The node pages and the DSL describe the rule.Tests:
test_read_range_adds_the_cells_a_title_cannot_hold_after_the_old_keys,test_every_key_main_returns_keeps_its_value_and_orderandtest_a_dropped_cell_whose_letter_is_taken_gets_a_suffixintests/test_google_sheets_service.py, andRepeatedAndBlankHeaderTestsintests/test_google_sheets_trigger_source.py.2. Google Sheets Max rows 0 as a number, empty or unset reads 100 rows
The docs, the DSL prompt and the editor ("Max rows (0 = all)", which shows 0 when the field is unset) say 0 reads every row. The node read
str(node_data.get("gsMaxRows", "100") or "100"), so a number0(as the AI builder writes it), a cleared field and a missing field became 100, and the rows after the 100th were cut off without a word. Only the text"0"read them all. Those now read every row; any other number still caps the range.Tests:
test_zero_blank_or_unset_max_rows_reads_every_rowandtest_a_max_rows_number_still_caps_the_rangeintests/test_google_sheets_node_blank_fields.py, which check the A1 range sent to the Sheets API (Sheet1!A1:ZagainstSheet1!A1:Z101onmain).3. A Decision node without
statesends nullThe docs and the DSL prompt give
statethe default$input.text, and the canvas sets it on new nodes, but the handler sent the field as it was: a node built without it, as the AI builder may write one, sent"state": null, and the model had nothing to read. An unset state now reads$input.text; an explicit value, including an empty one, is sent as written.With a stand-in for the Decision Model API that answers with the
stateit received ($DECISION_URL, a local listener on127.0.0.1, so the backend needsHEYM_HTTP_ALLOW_PRIVATE_URLS=true):main:NonePayouts are failingTest:
test_an_unset_state_reads_the_input_textintests/test_decision_node.py.Review changes
mainreturns keeps its value and order, and only the cellsmaindrops are added afterrowIndex, keyed by the column letter (_2when taken). The columns endpoint andchanged_columnsare as onmain, and a test checks themainkeys for several headers.Second round
SheetSnapshot.width) instead of for every row: a 10,000-row tab with every row changed takes 0.13 s per diff here, against 3.17 s on the previous commit and 0.12 s onmain(best of three, same machine).test_the_snapshot_width_is_computed_once_and_used_for_every_row.""(test_a_single_blank_title_is_also_keyed_by_its_letter); the node pages and the DSL say so.Checks
./run_tests.shagainst PostgreSQL: 9848 tests, 9848 passed.ruff check,ruff format --check,git diff --checkandscripts/check-file-line-limits.shpass.