Skip to content

[chore] Remove deprecated add_rows feature#15034

Merged
lukasmasuch merged 7 commits into
developfrom
lukasmasuch/remove-add-rows
May 5, 2026
Merged

[chore] Remove deprecated add_rows feature#15034
lukasmasuch merged 7 commits into
developfrom
lukasmasuch/remove-add-rows

Conversation

@lukasmasuch

@lukasmasuch lukasmasuch commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes

Removes the deprecated add_rows method and all related code from the codebase.

  • Removes add_rows method from ArrowMixin (previously available on st.dataframe, st.table, and chart elements)
  • Removes arrowAddRows delta type from proto definitions (field 7 now reserved)
  • Removes AddRowsMetadata and related helper functions from built_in_chart_utils.py
  • Removes frontend handling in AppRoot.ts, ElementNode.ts, and Quiver.ts
  • Deletes arrowConcatUtils.ts (Arrow concatenation utilities only used for add_rows)
  • Removes all related unit tests and E2E tests
  • Updates internal documentation

Breaking change: Users who relied on add_rows() will need to update their code. The method was deprecated with a warning pointing to #13063.

GitHub Issue Link (if applicable)

Testing Plan

  • Unit Tests (JS and/or Python)

Removed test files:

  • lib/tests/streamlit/elements/arrow_add_rows_test.py
  • e2e_playwright/st_add_rows.py and st_add_rows_test.py
  • frontend/lib/src/dataframes/__snapshots__/Quiver.test.ts.snap
  • Removed add_rows test sections from Quiver.test.ts, ElementNode.test.ts, vega_charts_test.py, forward_msg_queue_test.py
Agent metrics
Type Name Count
skill checking-changes 1
skill updating-internal-docs 1
subagent fixing-pr 1
subagent general-purpose 2
subagent reviewing-local-changes 1
subagent simplifying-local-changes 1

- Remove add_rows method from ArrowMixin
- Remove arrowAddRows delta type from proto (reserve field 7)
- Remove AddRowsMetadata and related helpers from built_in_chart_utils.py
- Remove frontend handling in AppRoot.ts, ElementNode.ts, Quiver.ts
- Delete arrowConcatUtils.ts (Arrow concatenation utilities)
- Remove all related unit tests and E2E tests
- Update internal documentation
- Simplify getDataArray in arrowUtils.ts (remove unused startIndex param)
- Make Quiver class fields readonly (no longer mutated)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 4, 2026 21:33
@lukasmasuch lukasmasuch added change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users labels May 4, 2026
@snyk-io

snyk-io Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Image Critical Image High Image Medium Image Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@lukasmasuch lukasmasuch added the ai-review If applied to PR or issue will run AI review workflow label May 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-15034/streamlit-1.57.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-15034.streamlit.app (☁️ Deploy here if not accessible)

@greptile-apps

greptile-apps Bot commented May 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes the deprecated add_rows feature from the codebase, cleaning up Python backend, TypeScript frontend, proto definitions, and all related tests across 35 files. The removal is consistent and complete: proto field 7 is properly reserved, generate_chart now returns a single chart instead of a tuple, Quiver fields become readonly without mutation needed, and all callers are updated accordingly.

Confidence Score: 5/5

Safe to merge — clean, complete removal of a deprecated feature with no leftover references or broken contracts.

The removal is thorough and consistent across proto, Python backend, TypeScript frontend, and all test layers. Proto field 7 is properly reserved, generate_chart return type is correctly simplified, Quiver fields are upgraded to readonly, and all call sites are updated. No P0/P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
proto/streamlit/proto/Delta.proto Field 7 (arrow_add_rows) removed from Delta.oneof type and correctly added to the reserved list alongside field 5, preventing future field-number reuse.
lib/streamlit/elements/arrow.py Removes add_rows method, _arrow_add_rows, and _prep_data_for_add_rows from ArrowMixin; cleans up related imports. Return-value docstrings updated to no longer reference .add_rows().
lib/streamlit/elements/lib/built_in_chart_utils.py Removes AddRowsMetadata, PrepDataColumns, prep_chart_data_for_add_rows, _last_index_for_melted_dataframes, _get_pandas_index_attr. generate_chart return type simplified from tuple to single chart; horizontal and use_container_width params removed (were only used to populate AddRowsMetadata).
lib/streamlit/elements/vega_charts.py All call sites of generate_chart updated to unpack a single chart value; add_rows_metadata parameter removed from _vega_lite_chart and all public chart methods; horizontal is now only used to choose ChartType, not forwarded to generate_chart.
frontend/lib/src/dataframes/Quiver.ts Removes addRows(), produce/immer usage, and concat import from arrowConcatUtils. Internal data fields promoted to readonly since mutation is no longer required.
frontend/lib/src/render-tree/AppRoot.ts Removes the arrowAddRows delta handler (including its error-to-element-node fallback) and the private arrowAddRows() tree-mutation method.
frontend/lib/src/render-tree/ElementNode.ts Removes arrowAddRows(), quiverAddRowsHelper(), vegaLiteChartAddRowsHelper(), and getNamedDataSet() helper; produce and ArrowNamedDataSet imports cleaned up.
lib/streamlit/runtime/forward_msg_queue.py _is_composable_message updated to only exclude new_transient delta type; add_rows/arrow_add_rows exclusions removed since those types no longer exist.
lib/streamlit/delta_generator.py add_rows_metadata parameter removed from _enqueue and both get_locked_cursor call sites; related type annotation cleaned up.
frontend/lib/src/dataframes/arrowConcatUtils.ts Entire file deleted — Arrow concatenation utilities were only consumed by Quiver.addRows(), which is also removed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["User calls st.dataframe() / st.line_chart() / etc."] --> B["DeltaGenerator._enqueue()"]
    B --> C["Cursor.get_locked_cursor(delta_type=...)"]
    C --> D["ForwardMsg with new_element delta"]
    D --> E["Frontend: AppRoot.applyDelta()"]
    E --> F{Delta type?}
    F -->|new_element| G["ElementNode created/updated"]
    F -->|new_block| H["BlockNode created/updated"]
    F -->|new_transient| I["Skipped in element tree"]
    F -->|arrowAddRows REMOVED| J["No longer exists"]
    G --> K["Quiver parses ArrowData (immutable, readonly fields)"]
    K --> L["Frontend renders chart/dataframe"]
Loading

Reviews (1): Last reviewed commit: "Remove deprecated add_rows feature" | Re-trigger Greptile

Delete 39 e2e snapshots that became orphaned after removing
the deprecated add_rows feature.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the deprecated add_rows feature end-to-end (Python API surface, proto delta, frontend render-tree handling, Arrow/Quiver concat utilities, and all associated unit/E2E tests), along with a few related doc/comment updates.

Changes:

  • Removes the Python add_rows API and backend helpers/metadata previously used for incremental Arrow updates.
  • Removes frontend support for the arrowAddRows delta path and deletes now-unused Arrow concat utilities and test fixtures.
  • Cleans up protocol usage and tests by removing arrow_add_rows usage across Python/TS/E2E suites.

Reviewed changes

Copilot reviewed 35 out of 74 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
proto/streamlit/proto/Delta.proto Removes the arrow_add_rows delta field and reserves the field number.
lib/tests/streamlit/runtime/forward_msg_queue_test.py Removes enqueue/flush coverage for arrow_add_rows deltas and updates expected counts.
lib/tests/streamlit/elements/vega_charts_test.py Removes add_rows-specific chart tests.
lib/tests/streamlit/elements/arrow_add_rows_test.py Deletes the dedicated add_rows backend unit test file.
lib/tests/streamlit/delta_generator_test.py Updates expected DeltaGenerator public API list (drops add_rows).
lib/streamlit/testing/v1/element_tree.py Updates element tree parsing comments now that add_rows deltas are gone.
lib/streamlit/runtime/metrics_util.py Updates internal comment/example that referenced add_rows.
lib/streamlit/runtime/forward_msg_queue.py Simplifies composability rules now that arrow_add_rows deltas are removed.
lib/streamlit/elements/vega_charts.py Removes add_rows plumbing/metadata passing and updates docstrings mentioning .add_rows().
lib/streamlit/elements/lib/built_in_chart_utils.py Removes AddRowsMetadata and add_rows-related helpers; generate_chart returns only the chart.
lib/streamlit/elements/arrow.py Removes add_rows method and backend enqueue logic for arrow_add_rows.
lib/streamlit/delta_generator.py Removes add_rows_metadata cursor plumbing from _enqueue and _block.
frontend/lib/src/render-tree/ElementNode.ts Removes arrowAddRows handling for ElementNode and related dataset helper.
frontend/lib/src/render-tree/ElementNode.test.ts Removes tests that covered ElementNode.arrowAddRows.
frontend/lib/src/render-tree/AppRoot.ts Removes arrowAddRows delta handling and error wrapping for that path.
frontend/lib/src/mocks/arrow/fewerColumns.ts Deletes Arrow mock data used only by add-rows concat tests.
frontend/lib/src/mocks/arrow/differentColumnTypes.ts Deletes Arrow mock data used only by add-rows concat tests.
frontend/lib/src/dataframes/Quiver.ts Removes Quiver.addRows and concat utility usage; makes internal fields immutable.
frontend/lib/src/dataframes/Quiver.test.ts Removes the addRows test suite and related fixtures/imports.
frontend/lib/src/dataframes/arrowConcatUtils.ts Deletes concat utilities that existed solely to support add_rows.
frontend/lib/src/dataframes/snapshots/Quiver.test.ts.snap Deletes snapshots that asserted add_rows concat error messages.
frontend/lib/src/components/widgets/DataFrame/hooks/useTableSizer.ts Updates comment that referenced row changes via add_rows.
frontend/lib/src/components/elements/ArrowVegaLiteChart/useVegaEmbed.ts Simplifies dataset replacement log message after data changes.
frontend/lib/src/components/elements/ArrowVegaLiteChart/arrowUtils.ts Removes incremental extraction parameter from getDataArray.
e2e_playwright/st_scatter_chart.py Removes add-rows styling scenario from the scatter chart app script.
e2e_playwright/st_scatter_chart_test.py Updates expected chart count and removes add-rows styling test.
e2e_playwright/st_line_chart.py Removes add-rows styling scenario from the line chart app script.
e2e_playwright/st_line_chart_test.py Updates expected chart count and removes add-rows styling/fullscreen test.
e2e_playwright/st_bar_chart.py Removes add-rows styling scenario from the bar chart app script.
e2e_playwright/st_bar_chart_test.py Updates expected chart count and removes add-rows styling test.
e2e_playwright/st_area_chart.py Removes add-rows styling scenario from the area chart app script.
e2e_playwright/st_area_chart_test.py Updates expected chart count and removes add-rows styling test.
e2e_playwright/st_add_rows.py Deletes the dedicated add_rows E2E app script.
e2e_playwright/st_add_rows_test.py Deletes the dedicated add_rows E2E test suite.
.claude/skills/understanding-streamlit-architecture/references/frontend.md Removes internal documentation mention of arrowAddRows.

Comment thread proto/streamlit/proto/Delta.proto
@lukasmasuch lukasmasuch added the change:breaking PR contains breaking change that affects backwards compatibility label May 4, 2026
@lukasmasuch lukasmasuch changed the title [chore] Remove deprecated add_rows feature [chore] Remove deprecated add_rows feature May 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

📈 Frontend coverage change detected

The frontend unit test (vitest) coverage has increased by 0.0800%

  • Current PR: 89.7300% (14776 lines, 1517 missed)
  • Latest develop: 89.6500% (14889 lines, 1540 missed)

🎉 Great job on improving test coverage!

📊 View detailed coverage comparison

@github-actions github-actions Bot removed the ai-review If applied to PR or issue will run AI review workflow label May 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Summary

This PR removes the long-deprecated add_rows API along with the entire supporting stack: the ArrowMixin.add_rows method, the arrow_add_rows proto field (now reserved 7), the AddRowsMetadata/prep_chart_data_for_add_rows chart utilities, the frontend arrowAddRows delta handler in AppRoot/ElementNode, the Quiver.addRows method along with arrowConcatUtils.ts, and all related unit/E2E tests, mock fixtures, and Quiver snapshots. Documentation references in dataframe/altair_chart/vega_lite_chart docstrings, the frontend.md architecture skill, and the metrics_util comment are updated, and the _is_composable_message exclusion set is simplified to {"new_transient"} accordingly.

Code Quality

The refactor is well-scoped, internally consistent, and idiomatic. A repo-wide search for add_rows/addRows/arrow_add_rows/arrowAddRows/AddRowsMetadata returns no remaining references. Notable cleanups that came along correctly:

  • Quiver instance fields that were previously mutated only inside addRows are tightened to private readonly.
  • getDataArray(quiverData, startIndex = 0) is correctly simplified to a single arg — the only previously non-zero use was on the removed add_rows path; current callers always passed 0.
  • useVegaEmbed.updateData keeps its branching structure (empty new data → remove; empty prev → insert; hash diff → replace) and only drops the now-misleading "more rows" comment. Behavior is preserved.
  • The ChartType.horizontal flag is no longer threaded through built_in_chart_utils.generate_chart; user-facing horizontal-bar behavior is preserved because bar_chart still selects ChartType.HORIZONTAL_BAR vs VERTICAL_BAR.
  • With add_rows_metadata gone, Cursor.props / get_locked_cursor(**props) are now only exercised by their own unit tests. Not blocking, but a follow-up cleanup opportunity.

There was one inline disagreement among reviewers worth resolving here: the deletion of arrow_add_rows = 7 from Delta.proto is correct. The field number is properly retired via reserved 5, 7;, which is the standard protobuf pattern (already used for the prior 5 slot) and prevents any accidental reuse of slot 7 in future schema changes. proto3 also silently ignores unknown fields, so an older client receiving a newer message without slot 7 — or vice versa — does not break wire compatibility. No protocol-compatibility blocker here.

Test Coverage

Coverage is appropriately maintained for the surviving features:

  • delta_generator_test.test_public_api is updated to drop add_rows, asserting it is no longer part of the DeltaGenerator public API.
  • forward_msg_queue_test is updated to assert the new queue length now that new_element + new_element / add_block compositions are allowed.
  • vega_charts_test drops the add_rows/styling-preservation tests (they only exercised removed code paths).
  • The chart E2E scripts (st_line_chart.py, st_bar_chart.py, st_area_chart.py, st_scatter_chart.py) lose only the add_rows-specific scenarios, and their TOTAL_*_CHARTS counts/index comments are updated consistently.

No replacement coverage exists for the legacy .add_rows() failure path — calls like st.dataframe(df).add_rows(df2) will now raise a generic AttributeError instead of an actionable migration message. Optional follow-up.

Backwards Compatibility

This is an intentional, user-facing breaking change for an already-deprecated API. Calls like st.dataframe(df).add_rows(df2), st.table(...).add_rows(...), or chart .add_rows(...) updates will now raise AttributeError instead of emitting a deprecation warning. The PR description and labels (change:chore, impact:users) call this out, and tracking issue #13063 exists. The proto field number is correctly reserved to prevent future reuse, so older/newer client–server pairs cannot accidentally reinterpret the slot. Anyone with a third-party wrapper invoking the (private) _arrow_add_rows/prep_chart_data_for_add_rows/AddRowsMetadata symbols would also break, but those are internal and the deprecation has been visible for a long time.

Security & Risk

No security-sensitive code paths are touched: there are no changes to auth, cookies, websocket handshake, file uploads/serving, CSP headers, iframe/postMessage, OAuth, or sandbox boundaries. The Arrow concatenation logic that was removed dealt only with structural concat of pyarrow tables on the client; removing it reduces surface area rather than expanding it. The primary remaining risk is API compatibility for users of the deprecated .add_rows(), which is the intended product change.

External test recommendation

  • Recommend external_test: No
  • Triggered categories: None
  • Evidence:
    • proto/streamlit/proto/Delta.proto: only retires a oneof slot via reserved; no transport/handshake change.
    • lib/streamlit/runtime/forward_msg_queue.py: composition exclusion list change is queue-internal, no impact on websocket framing/auth.
    • lib/streamlit/elements/arrow.py, vega_charts.py, built_in_chart_utils.py, delta_generator.py: pure API/feature removal; no routing, asset serving, embedding, storage, or SiS code touched.
    • Frontend changes (AppRoot.ts, ElementNode.ts, Quiver.ts, arrowUtils.ts, useVegaEmbed.ts) are render-tree/data-shape only; no postMessage, iframe, CSP, fetch/CORS, or service-worker behavior changed.
  • Suggested external_test focus areas: None.
  • Confidence: High
  • Assumptions and gaps: Assumes downstream embeds/SiS deployments do not depend on receiving Delta.arrow_add_rows from a server with this change (only relevant for mismatched older client/server pairs; standard release pairing avoids this).

Accessibility

No accessibility-relevant frontend changes — the diffs are limited to data-handling logic and removal of dead code paths. No DOM/ARIA/keyboard behavior is altered.

Recommendations

  1. (Merge-blocker) Delete the now-orphaned E2E snapshot images. The snapshot-hygiene.yml workflow runs on PRs that touch e2e_playwright/** and will fail because 39 PNGs are still tracked under git for tests/scenarios this PR removes:

    • The entire directory e2e_playwright/__snapshots__/linux/st_add_rows_test/ (24 files for st_dataframe-added_rows and st_vega_lite_chart-added_rows-{0..6} × {chromium, firefox, webkit}).
    • 15 chart-specific snapshots: st_line_chart_test/st_line_chart-add_rows_after_fullscreen[*].png, st_line_chart_test/st_line_chart-add_rows_preserves_styling[*].png, st_bar_chart_test/st_bar_chart-add_rows_preserves_styling[*].png, st_area_chart_test/st_area_chart-add_rows_preserves_styling[*].png, st_scatter_chart_test/st_scatter_chart-add_rows_preserves_styling[*].png.

    Run uv run python scripts/snapshot_cleanup.py locally to remove them.

  2. (Optional) Consider a focused regression test (or a clearer error path) that calls .add_rows() on a dataframe/chart and confirms the new failure mode, so upgrades surface a more actionable message than a generic AttributeError.

  3. (Optional) With add_rows_metadata gone, Cursor.props / get_locked_cursor(**props) are no longer consumed by production code. Consider a follow-up to drop the now-vestigial **props plumbing (and matching tests).

  4. (Optional) The lazyQuiverElement/lazyVegaLiteChartElement getters in frontend/lib/src/render-tree/ElementNode.ts can no longer be reassigned by an external mutator after this PR. They still need to stay mutable for first-access lazy hydration, but the surrounding // TODO (lukasmasuch): Delete element from proto object? could be revisited now that incremental-rows mutation is gone.

Verdict

CHANGES REQUESTED: Removal is clean, well-tested, and the breaking change is intentional, but the orphaned E2E snapshot images need to be deleted before merge to avoid snapshot-hygiene CI failures.


This is an automated AI review consolidated by claude-opus-4-7-thinking-xhigh. Please verify the feedback and use your judgment.

This review also includes 1 inline comment(s) on specific code lines.

Comment thread frontend/lib/src/dataframes/Quiver.ts Outdated
@github-actions github-actions Bot added the do-not-merge PR is blocked from merging label May 4, 2026
With the removal of the add_rows feature, Quiver is no longer mutated via
Immer's produce function. The immerable symbol and class property are no
longer needed.

Addresses review comment suggesting this cleanup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukasmasuch lukasmasuch added the ai-review If applied to PR or issue will run AI review workflow label May 4, 2026
With add_rows_metadata removed, the `**props` parameter and `props`
property in Cursor classes were no longer consumed by production code.
This commit removes the now-unused plumbing from get_locked_cursor()
and LockedCursor.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the ai-review If applied to PR or issue will run AI review workflow label May 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Summary

This PR removes the deprecated add_rows() method and all related code paths end-to-end: Python public API (ArrowMixin.add_rows), backend plumbing (_arrow_add_rows, _prep_data_for_add_rows, AddRowsMetadata, prep_chart_data_for_add_rows, _get_pandas_index_attr, _last_index_for_melted_dataframes, the add_rows_metadata thread through DeltaGenerator._enqueue/_block), the Delta.arrow_add_rows protobuf field (field 7, now added to reserved), the unused ArrowNamedDataSet import, frontend render-tree handling (Quiver.addRows, arrowConcatUtils.ts, ElementNode.arrowAddRows/getNamedDataSet, the arrowAddRows branch in AppRoot.applyDelta, the [immerable] marker on Quiver, the unused startIndex param in getDataArray), the runtime composability check in forward_msg_queue._is_composable_message, all add_rows-specific Python/frontend/e2e tests, fixtures, mocks (differentColumnTypes.ts, fewerColumns.ts), snapshots, and a stale bullet from the architecture skill. Chart count constants in chart e2e tests are decremented accordingly. add_rows had been emitting a deprecation warning pointing to issue #13063, so this is a planned breaking change carrying the change:breaking / impact:users labels. As a side cleanup, generate_chart now returns alt.Chart | alt.LayerChart rather than a 2-tuple (removing awkward unpacking at every caller in vega_charts.py).

Code Quality

The deletion is unusually thorough — all reviewers independently verified that no residual references to add_rows, arrow_add_rows, arrowAddRows, or AddRowsMetadata remain in the repo (including snapshots, mocks, docs, and skill references). Imports are consistently cleaned up (ArrowNamedDataSet, ensureError, makeElementWithErrorText in AppRoot.ts; produce/immerable/concat in Quiver.ts; Hashable, npt, DataFrame, ForwardMsg, enqueue_message in arrow.py; AddRowsMetadata in vega_charts.py/delta_generator.py; cloneDeep/mock fixtures in Quiver.test.ts).

The plumbing simplifications are nice quality-of-life wins: generate_chart's tuple-to-single-value refactor, DeltaGenerator._enqueue no longer threading add_rows_metadata, and arrowUtils.getDataArray losing its unused startIndex parameter. Quiver's internal fields (_pandasIndexColumnTypes, _dataColumnTypes, _columnTypes, _pandasIndexData, _data) are correctly tightened to readonly now that mutation is gone.

A couple of small stylistic follow-ups were noted inline (a clarifying comment in _is_composable_message, an explicit elif type == "new_transient" in element_tree.py instead of a catch-all else: continue, a JSDoc note on Quiver immutability, and a follow-up to drop the now-dead **props escape hatch on Cursor.get_locked_cursor/LockedCursor). None are merge-blocking.

Test Coverage

Test removals are appropriate and targeted at the removed surface: lib/tests/streamlit/elements/arrow_add_rows_test.py (entire file), the test_add_rows* / test_*_preserves_initial_* cases in vega_charts_test.py, the ADD_ROWS_MSG fixture in forward_msg_queue_test.py (queue-length expectations correctly updated 7 → 5, 4 → 3), the ~1000-line Add rows describe-block and ~250-line ElementNode.arrowAddRows describe-block on the frontend, and e2e_playwright/st_add_rows.py / st_add_rows_test.py plus test_add_rows_preserves_styling / test_add_rows_after_fullscreen and their snapshots. Coverage for the surviving "shape" of charts (empty data, styling, stack/horizontal/sort) is preserved through the existing parametrized BuiltInChartTest cases and chart-specific test_*_styling paths.

One observation worth noting (not a regression for this PR): with ADD_ROWS_MSG gone, _is_composable_message no longer has a test that explicitly exercises a non-composable delta — new_transient is the only remaining non-composable type and isn't directly covered. Adding a small targeted test would be a nice follow-up if more delta types are introduced later.

Backwards Compatibility

This is intentionally a breaking change (PR is labeled change:breaking / impact:users):

  • Apps still calling dg.add_rows(...) will raise AttributeError: 'DeltaGenerator' object has no attribute 'add_rows' after upgrade. The previous deprecation pathway (runtime warning pointing to issue #13063) prepared users for this; the release notes / changelog should explicitly call out the removal so users still on add_rows get an actionable upgrade note.
  • Field 7 of Delta is correctly added to reserved, so the wire format is forward-compatible at the protobuf level — old clients that still recognize arrow_add_rows simply won't see it; the default branch in AppRoot.applyDelta will throw Unrecognized deltaType if a stale server were to send it, which is acceptable for mismatched client/server pairings.
  • Reviewers disagreed on whether deleting field 7 from a "released" Delta message conflicts with proto/streamlit/proto/AGENTS.md (which restricts modifying/removing fields to unreleased messages). Established precedent (PR #13760 removed NamedDataSet add_rows = 5 from this same Delta message and used reserved 5;) supports the current approach, and the field is properly reserved here, so wire compatibility is preserved either way. Flagged inline for the author's call.
  • Removing arrowConcatUtils.ts, differentColumnTypes.ts, fewerColumns.ts from frontend/lib/src/mocks/arrow/ is fine — these are internal test mocks, not part of the published @streamlit/lib API surface.
  • Quiver lost its [immerable] = true marker; this is benign because addRows was the sole consumer of produce(quiver, ...) and there are no remaining call sites in the repo.

Security & Risk

No security-sensitive surfaces are touched. The diff does not modify auth, cookies, CSRF/XSRF, file upload/serving, asset routing, CSP, iframe postMessage, OAuth, secrets, or eval/Function() paths. The runtime change in forward_msg_queue.py is a pure simplification of the composable-message check and does not affect message delivery semantics for any delta type that still exists. The [immerable] removal on Quiver and the protobuf field reservation (reserved 5, 7;) are both safe in isolation.

External test recommendation

  • Recommend external_test: No
  • Triggered categories: None
  • Key evidence:
    • proto/streamlit/proto/Delta.proto: field 7 is reserved; no transport, embedding, or routing changes.
    • lib/streamlit/runtime/forward_msg_queue.py: only the composability denylist is simplified; no handshake/session/CSRF changes.
    • No changes under lib/streamlit/web/, no changes to CSP/headers, no changes to iframed/embed code paths, no changes to upload/download endpoints, no running_in_sis() or Snowflake-runtime touches, no cookie/storage changes.
  • Suggested external test focus areas: N/A (pure deletion of a deprecated public-API surface and its internal plumbing).
  • Confidence: High
  • Assumptions/gaps: existing chart e2e tests still re-validate end-to-end rendering of st.line_chart, st.area_chart, st.bar_chart, st.scatter_chart, and st.vega_lite_chart; their snapshots remain.

Accessibility

No accessibility-relevant frontend surfaces are touched. The removed code was non-UI rendering logic (delta application + Arrow concatenation). DOM, ARIA, focus management, and keyboard handling are unaffected.

Recommendations

  1. Make sure release notes / changelog explicitly highlight the breaking removal of .add_rows() so users still on the deprecated API get an actionable upgrade note in addition to the previous deprecation warning.
  2. (optional, follow-up) Consider tightening Cursor.get_locked_cursor(self, **props: Any) and the matching LockedCursor.__init__(..., **props: Any) to drop **props now that add_rows_metadata was the only consumer.
  3. (optional) Consider adding a single test for _is_composable_message covering the remaining new_transient branch so the only surviving non-composable case has explicit coverage.
  4. (optional) If proto/streamlit/proto/AGENTS.md is meant to strictly forbid removing fields from released messages, either switch field 7 to [deprecated=true] (and keep the field defined) or update AGENTS.md to document reserved-based removal as the accepted pattern. See inline comment.

Verdict

APPROVED: A clean, comprehensive removal of a deprecated feature with consistent backend, frontend, protobuf, and test cleanup. Two of three reviewers approved unconditionally; the third raised a protobuf-policy concern about deleting field 7 from a released Delta message, which on review is contradicted by established maintainer precedent on this same message (PR #13760), with field 7 correctly reserved to preserve wire compatibility. Remaining notes are non-blocking and tracked inline.


This is an automated AI review consolidated by claude-opus-4-7-thinking-xhigh from reviews by claude-opus-4-7-thinking-xhigh, gemini-3.1-pro, and gpt-5.4-xhigh. Please verify the feedback and use your judgment.

This review also includes 5 inline comment(s) on specific code lines.

Comment thread proto/streamlit/proto/Delta.proto
Comment thread lib/streamlit/testing/v1/element_tree.py
Comment thread lib/streamlit/runtime/forward_msg_queue.py
Comment thread frontend/lib/src/dataframes/Quiver.ts
Comment thread lib/streamlit/delta_generator.py
@github-actions github-actions Bot removed the do-not-merge PR is blocked from merging label May 4, 2026
lukasmasuch and others added 2 commits May 5, 2026 09:24
- Add explicit elif for new_transient delta type in element_tree.py to
  avoid silently swallowing future delta types
- Expand comment in forward_msg_queue.py to clarify why new_transient
  is the only non-composable delta type
- Add JSDoc note to Quiver class documenting immutability and warning
  against use with Immer's produce()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

@sfc-gh-lwilby-1 sfc-gh-lwilby-1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Resolved modify/delete conflicts by keeping deletions of add_rows
snapshot files, consistent with this branch's removal of add_rows
functionality.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukasmasuch lukasmasuch enabled auto-merge (squash) May 5, 2026 17:29
@lukasmasuch lukasmasuch merged commit 549fce0 into develop May 5, 2026
41 checks passed
@lukasmasuch lukasmasuch deleted the lukasmasuch/remove-add-rows branch May 5, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:breaking PR contains breaking change that affects backwards compatibility change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users

Projects

None yet

3 participants