Skip to content

One method order, one name for seeding, one dispatcher chain; bind instead of rebuilding - #896

Merged
oblomov-dev merged 2 commits into
mainfrom
claude/kind-bohr-t0ly94
Nov 10, 2026
Merged

oblomov-dev merged 2 commits into
mainfrom
claude/kind-bohr-t0ly94

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Three changes that make the samples read alike, and like samples-controls.

1. Method order and the name for seeding

This step changes no statement.

  • Order: main, view_display, on_event, handlers and helpers, model_init last, in declarations and implementation. A reader meets what the app shows first, then what it does, and the seed data at the end. 106 classes are reordered.
  • model_init only seeds. 18 on_init methods became model_init, and main calls view_display( ) after it. Five on_init that only passed one call on are inlined.
  • Kept: seven apps keep an on_init that does more than seed and display (004, 081, 381, 382, 421, 501, 543).
  • AGENTS.md states the order, and the template follows it.

2. Dispatcher

Only a handful of classes deviated from the one IF/ELSEIF chain.

  • Rewritten into the chain: 052, 161, 167, 325, 536.
  • Left, with a comment in main( ) saying why: 024, 025.
  • Unchanged: the others on the list were already explained or already canonical.

3. Rebuilds in event handlers

  • Bound instead of rebuilt: 011 (edit_button_text), 025, 468, 480, 471.
  • Redundant rebuild removed (the table is bound anyway): 019 BUTTON_READ_SEL, 500 delete and refresh.
  • Kept, now with a comment saying why the model push is not enough: 012, 019 (segment change), 025 (view switch), 065, 074, 173, 306, 488, 518, 533.

Behaviour changes to be aware of

  • 167 and 325 no longer evaluate an event on a navigated roundtrip. This matters only if a caller navigates in with one of their own event names; neither app calls another.
  • 500: a growing table that had grown past its first page is no longer reset to it after delete or refresh.

Left alone on purpose

019 (the table mode), 067 and 143. It was not clear whether the rebuild there is part of what the sample shows.

Checks

  • Every step of npm run check is green except check:abap2ui5.
  • check:abap2ui5 reports the known binding-to-reference error on app 061, as on main. It goes with the next linter release on npm.
  • Not run in a browser or on a system.

Generated by Claude Code

…nt, model_init last

A reader meets what the app shows first, then what it does, and the seed
data at the end - the order samples-controls always had. 106 classes are
reordered (implementation and declarations). The first extraction is
model_init and only seeds; main displays after it: 18 on_init methods
became model_init, 5 that only passed a call on are inlined. Seven apps
keep an on_init that does more than seed and display. AGENTS.md states
the order and the template follows it. No statement changed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YZFmEbWzsAKBJU9C5JSHn
Dispatcher (19 classes reviewed):
- 5 rewritten into the canonical IF/ELSEIF chain with unchanged behaviour:
  052, 161, 167, 325, 536 (no RETURN, no second IF block, no bare ELSE,
  events checked in the check_on_event( ) branch).
- 2 keep their deliberate shape and now say why in main( ): 024 (takes the
  event the called app hands back), 025 (seeded by its caller).
- 12 unchanged: already canonical (045, 061, 125, 503) or already
  commented (004, 047, 071, 098, 104, 105, 112, 504).

View rebuilds in event handlers (40 classes reviewed):
- 5 converted to a bound public attribute, the view_display( ) call
  removed from the event path: 011 (edit button text), 025 (input of the
  previous app), 468 and 480 (counter), 471 (toggle button text).
- 2 redundant rebuilds removed, the changed table was bound already:
  019 (BUTTON_READ_SEL), 500 (BUTTON_DELETE, BUTTON_REFRESH).
- 10 keep the rebuild with a comment above the call saying why the model
  push is not enough: 012, 019, 025, 065, 074, 173, 306, 488, 518, 533.
- The rest had such a comment already or no rebuild on an event path.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014YZFmEbWzsAKBJU9C5JSHn
@oblomov-dev
oblomov-dev merged commit 8597b70 into main Nov 10, 2026
21 of 23 checks passed
@oblomov-dev
oblomov-dev deleted the claude/kind-bohr-t0ly94 branch November 10, 2026 19:21
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.

2 participants