chore(ariba): retire AribaPicker and _select_all_attachments (#195) - #197
Merged
Conversation
Both were left in place when #185 removed their last caller (`AribaFileSource._read_expected_count`, part of the picker-count round trip proven to compare incommensurable quantities) — deleting working, hard-won code as a side effect of removing a phantom check wasn't that issue's call to make. #186 later retired `ariba_batch.py`, the module `AribaPicker` was originally built for, and deliberately left this pair alone too, per explicit instruction to track it as its own issue. Confirmed via grep before removing: no call sites for either outside their own definitions and `tests/test_ariba_select_all.py`. Removed as one cohesive cluster, all of it orphaned by the same #185 cut: - `AribaPicker` (the class itself) - `_select_all_attachments`, `parse_total_mb`, `parse_selected_items`, `_selected_total_mb`, `_on_picker`, `_outline_sort_key` — module-level helpers whose only callers were inside `AribaPicker` or the round trip - `_TOTAL_MB`, `_SELECTED_ITEMS`, `_ROW_KEY`, `MAX_BUNDLE_MB` — regexes and a constant that only fed the functions above - `tests/test_ariba_select_all.py` (148 lines, 11 tests) Kept, because active code still depends on them: `PICKER_HEADING` (`_on_event_view` checks for its absence to confirm the content tree, not the picker, is in front of it) and `_ListScroller` plus its four JS constants (shared scroll infrastructure — `AribaFileSource` is now its only user, but it was never picker-specific). Updated the ~10 remaining historical comments in `AribaFileSource` that referenced `AribaPicker`'s lessons (re-render invalidation, idempotent expansion, row ordering) to past tense with a #195 pointer, rather than leaving them read as though the class they credit still exists. One, `list_files`'s docstring, still described the four-things-this-class- exists-to-get-right count as four; fixed to three, since the fourth (reading the picker's count before the traversal) was already retired in #185 and never updated there. 770 tests passing (781 - 11 deleted with test_ariba_select_all.py). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W53WHx8mm2UHuLFAQWeF62
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.
Closes #195.
Background
#185 removed
AribaFileSource._read_expected_count— the last live caller of bothAribaPicker(the picker widget's Playwright adapter) and the module-level
_select_all_attachmentshelper —when the picker-count comparison it fed was proven to compare incommensurable quantities (54
picker vs. 39 traversal vs. 178 true leaves on one validated event). Neither was deleted at the
time, on the reasoning that removing working, hard-won code as a side effect of fixing a phantom
check wasn't that PR's call to make.
#186 then retired
ariba_batch.py— the moduleAribaPickerwas originally built to satisfy thePicker protocol of — and deliberately left this pair alone too, per explicit instruction to track
their retirement as its own issue rather than fold it in.
What this does
Confirmed via
grepbefore removing anything: no call sites forAribaPickeror_select_all_attachmentsoutside their own definitions andtests/test_ariba_select_all.py.Removed as one cohesive cluster — everything orphaned by the same #185 cut:
AribaPicker(the class itself, ~530 lines)_select_all_attachments,parse_total_mb,parse_selected_items,_selected_total_mb,_on_picker,_outline_sort_key— module-level helpers whose only callers were insideAribaPickeror the picker-count round trip_TOTAL_MB,_SELECTED_ITEMS,_ROW_KEY,MAX_BUNDLE_MB— regexes and a constant that onlyfed the functions above (the last one a leftover from the retired single-zip bundle ceiling
check, referenced nowhere in source, only in the test file below)
tests/test_ariba_select_all.py(148 lines, 11 tests)Kept, because active code genuinely depends on them — traced every reference before touching
anything, not assumed:
PICKER_HEADING—_on_event_view(still active, guards every traversal/download) checks forits absence to help confirm the content tree, not the picker, is in front of it
_ListScrollerand its four JS constants (_FIND_CONTAINER_BODY_JS,_CONTAINER_STATE_JS,_GEOMETRY_JS,_PROGRAMMATIC_SCROLL_JS) — genuinely shared scroll infrastructure, parametrisedfor both the picker and the content tree from day one.
AribaFileSourceis now its only user,but it was never picker-specific.
A gap this pass caught along the way
AribaFileSource's own class docstring still listed "Four things this class exists to getright," with the fourth being "the count is read BEFORE the traversal, and the event view is
restored after" — the exact round trip #185 removed, never updated there. Fixed to three, and
updated the ~10 other historical comments across the file that referenced
AribaPicker's specificlessons (re-render invalidation, idempotent expansion, row ordering, the six-live-run scroll
debugging) to past tense with a
#195pointer, rather than leaving them read as though the classthey credit still exists.
Verification
grepbefore deleting — in particular, distinguished module-levelhelpers/constants used only by the orphaned cluster from ones shared with the still-active
AribaFileSource/_ListScroller, since several sit interleaved in the same file.grepthat no reference toAribaPicker,_select_all_attachments, or the other removed names remains anywhere intoronto_bids/ortests/.test_ariba_select_all.py).🤖 Generated with Claude Code
https://claude.ai/code/session_01W53WHx8mm2UHuLFAQWeF62