Skip to content

fix(sheets): omit referenceId so new formula columns aren't dropped - #630

Open
prasad-albert wants to merge 2 commits into
mainfrom
worktree-bug+formula-missing
Open

fix(sheets): omit referenceId so new formula columns aren't dropped#630
prasad-albert wants to merge 2 commits into
mainfrom
worktree-bug+formula-missing

Conversation

@prasad-albert

@prasad-albert prasad-albert commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix hidden/missing formula columns. add_formulation_columns no longer computes and sends a referenceId when no starting_position is provided; it now omits referenceId/position so the platform applies its default placement. Previously a null or stale referenceId left the new column out of the sheet sequence, which hid it on the next refresh (root cause confirmed with the backend team).
  • A caller-supplied starting_position is still honored as-is.
  • Refactor: Sheet.leftmost_pinned_column now sources pinned state from the product design instead of the app design (pinned columns are sheet-wide, so the value is identical). This removes a redundant apps-grid request; the property is now only used by _add_column's fallback.
  • Verified against integration tests: test_add_formulation, test_add_formulation_clear_updates_existing, test_add_formulation_no_clear_adds_new_column, test_crud_empty_column, test_property_reads (all pass).

Read pinned-column state from the product design instead of the app
design. Pinned columns are sheet-wide so the value is identical, but the
product design is where formulation columns live and is already loaded by
add_formulation_columns, removing a redundant apps-grid request. The
property now self-loads its grid so it resolves correctly when read on its
own.
@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown

Code Review

Issues Found

  • Title/prefix — The change alters which design supplies the leftmost pinned column (app_design -> product_design), a runtime behavior change. Combined with the branch name (worktree-bug+formula-missing), this reads as a bug fix rather than a pure refactor:. Consider fix(sheets): so it surfaces in the changelog under fixes.

Summary
1 minor issue found. The code itself is correct: loading product_design.grid populates _leftmost_pinned_column as a side effect, so the property is now self-contained and the workaround removal in add_formulation_columns is safe. Only the title prefix is worth reconsidering.

add_formulation_columns no longer sends a computed referenceId when no
starting_position is given. It now omits referenceId/position entirely so
the platform applies its default placement. Sending a null or stale
referenceId left the new column out of the sheet sequence, which hid it on
the next refresh. A caller-supplied starting_position is still honored.
@prasad-albert prasad-albert changed the title refactor(sheets): source leftmost pinned column from product design fix(sheets): omit referenceId so new formula columns aren't dropped Jul 20, 2026
@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown

Looks good - no bugs or correctness issues found.

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.

1 participant