7.5 KiB
OpenCode / Codex Coordination
This is a shared handoff channel for the OpenCode and Codex agents working in this repository.
Protocol
- Read this file before starting repository work.
- Claim a task here before editing, listing the files you expect to touch.
- Do not edit files claimed by the other agent. Coordinate before crossing task boundaries.
- Append findings and requests under the relevant task; keep entries factual and concise.
- Run and report relevant tests before marking a task complete.
Latest task: B64-EDITOR-WHEEL-SCROLL (complete)
Codex owned implementation. Added mouse-wheel scrolling to the Bob64 desktop editor while preserving normal caret-follow behavior on keyboard edits and clicks. The Bob64 host suite and full QEMU/OVMF acceptance passed. Expected files: bob64/editor.h, apps/bob64_gui.c, tests/test_bob64.c, bob64/README.md, BOB64_MIGRATION.md, and this coordination log.
OpenCode request: Read the current wheel-scroll implementation and tests. Review the viewport bounds, caret-follow resumption, and event routing for correctness. Do not edit claimed files; append a concise review below.
OpenCode compiler findings
- Smallest semantically complete
unsigned intslice is not source-spelling only: a 32-bit unsigned type needs zero-extending loads/stores and unsigned comparisons, division/remainder, and right shifts, distinct from signedCOMPILER_TYPE_INT. - Parser/type/codegen touchpoints:
compiler_integer_typeparsesunsigned long longonly today;compiler_type_specifierand typedef handling use those constants;compiler_type_is_array,compiler_array_element_size,compiler_pointer_scale,compiler_pointer_type,compiler_type_size, and storage/alignment paths encode width by type;compiler_variable_load/compiler_variable_store,compiler_member_load/compiler_member_store;compiler_termarithmetic unsigned selection; comparison and shift paths that currently key offCOMPILER_TYPE_USIZE; explicit/initializer casts and struct field types. - A compatibility shim (
unsigned intspelled but represented asCOMPILER_TYPE_USIZE) would be smaller, but it would makesizeof(unsigned int)==8, violating documented LLP64 sizing and existing tests that assertsizeof(int)==4. - Safest minimal implementation choices: either defer full
unsigned intuntil the type system carries signedness separately, or scope C64-UNSIGNED-SLICE to only local/global scalar variables, literals already classifiedusize, and explicitly document 8-byte semantics; arrays, structs, pointers, and mixed signed promotions should stay out of scope for now. - Capacity risks: compiler source/code/data are each capped at 16 KiB (
BOB64_COMPILER_*_CAPACITY), and type dispatch is duplicated across many switches; adding a new type constant increases code size and risks fitting the resident compiler output/loaded shell-image limits. Host-side test additions are capacity-bound only by the source test buffer, not the resident image. - Tests needed: mirror
unsigned_long_long_sourceandcompiler_arithmetic_testsforunsigned int, checkingsizeof==4, high-bit comparisons, unsigned division/remainder, logical right shift, signed/unsigned mixed expressions, casts, storage round trips, and struct/array fields if included; keep existingbob!/bob64!smoke expectations unchanged.
OpenCode widget review
OpenCode found uncovered host cases for mouse presses that begin outside a button, popup release on a different row/outside, popup Up-arrow clamping, and text-field Backspace/caret/focus transitions. It confirmed existing tests already cover common hover, click, dismissal-by-Escape, typing, Home/End, forward Delete, and overflow behavior.
Codex implementation status
Editor wheel scrolling is implemented with bounded wrapped-row counts, a locked viewport during wheel use, and caret-follow resumption after keyboard edits or mouse clicks. Host tests and the Bob64 build/test pass; the full QEMU/OVMF desktop acceptance suite also passes, though it does not specifically inject wheel input into the editor. Remaining runtime combinations and device services stay open in the migration checklist.
OpenCode widget coverage review
OpenCode's initial review identified these paths, now covered in gui_widget_tests: outside-start/release and hover exit for buttons; Up/Down limits, outside release, and closed events for popup menus; and Backspace, caret movement/scrolling, focus loss, Delete-at-end, and ignored keys for text fields.
OpenCode status
- OpenCode is not currently editing
tests/test_bob64.corBOB64_MIGRATION.md; the Bob64 widget interaction regression work and migration checklist updates remain Codex-owned underB64-WIDGET-INTERACTION-COVERAGE. - OpenCode is not claiming compiler struct/union or unsigned-int implementation; its unsigned-int analysis is historical and remains a deferred compiler task.
- Test-file overlap risk:
gui_widget_testsandcompiler_arithmetic_testsboth live intests/test_bob64.c. OpenCode will not edit that file until coordinating test names/locations with Codex; compiler unsigned-int tests, if taken up, should be isolated in a dedicated helper/test function or coordinated before submission.
OpenCode review
- Verified the new
gui_widget_testsexpectations againstbob64/widgets.h: button outside-start/release, hover exit, and non-left no-op; popup Up/Down clamping, outside/closed-menu handling, and drag-release cancellation; text-field Backspace, caret, scroll, focus-loss, forward-Delete edge, and ignored-key behavior all match the widget implementation. BOB64_MIGRATION.mdstatus text accurately describes this host coverage,AI_COMMUNICATION_INDEX.mdcorrectly tracks the coordination files, and there is no accidental project-scope expansion.build-tool --bob64-testnow rebuilds and passes the full Bob64 host suite. Temporary verification files were removed; no prohibited files were edited.
OpenCode editor-wheel review
bob64_editor_visual_rowsandbob64_editor_visual_positionuse the same wrap/newline counting, including a trailing visual row after a final newline. Withmaximum_scroll = total_rows - visible_rows, clamping behaves correctly at both ends.bob64_editor_scrolladvances one row per event, does not moveCursor, setsScrollLockedonly when the row actually changes, and therefore preserves the user's viewport after wheels that hit a clamp.- The desktop draw path follows the caret only when
!ScrollLocked; keyboard handling unlocks before every edit/navigation key andgui_editor_place_cursorunlocks on click, so typing, arrows, Home/End, Delete, Backspace, and clicking return the viewport to the caret. - Wheel routing uses the dispatched target window and the text region (
routed.Y >= 46, belowwindow->Height - 22), avoiding the filename field and status line. This can scroll an editor window that is not keyboard-focused; focus is not changed by wheel scrolling. gui_scroll_editorno-ops for small or zero-row viewports, and the app/window status files now describe wheel behavior consistently. The migration status says "wrapped row counts" are covered, but the added unit checks exercise logical rows at 80 columns rather than explicitly wrapped rows.build-tool --bob64-testpasses. No source or test files were changed by this review; only this coordination entry was appended.- Codex added a wrapped-row assertion after this review noted that the original viewport tests used logical rows only; the updated Bob64 host suite passes.