Consolidate Actions, NCU and Nano Programs lists into one reusable Lua table
MERGED/CLEANED UP: verified PR2805 hasMerged=true at2026-10-22T08:30:36Z. User requested cleanup of all session worktrees/agents. Closed Shared Herdr workspace wY and integration testing panes wJ:p4/p5; removed all six remaining engines-client-lua-* worktrees (actions,aot,readiness,windows,shared-capabilities,integrated) after archiving source patches/manifests and selected evidence/research at /home/mathias/Projects/worktrees/lua-window-worker-archives/final-20261022T083253Z/ (248MiB). The AOT experiment had13 uncommitted source paths, all copied and hash-verified before removal; published integration/other trees were clean. Previous Stats/NCU/Nano archive20261022T074002Z remains. Local branch refs and global Pi transcripts retained. Main checkout/current coordinator and unrelated workspaces/worktrees were not removed; no Git branches or remote history deleted. Future implementation must start from current develop, not deleted worktree paths or obsolete feature bases. Platform caveats below remain historical verified limits. CURRENT PUBLICATION: user invoked /open-pr, explicitly authorizing staging/committing/pushing and PR creation. Final combined working state was staged (not the historical index alone), committed, and unpublished local history rebased cleanly onto origin/develop af78d2b43. git range-diff shows all three feature/fix patches unchanged. Published head308da9da7 (feature: Migrate character windows to shared Lua components), preceding local fixes now3b354fbc1 (content height) and7e4b62951 (XML click sound). Ready/non-draft PR2805: https://git.project-rk.com/prk/engines/pulls/2805, feature/client-lua-window-migrations -> develop. Worktree clean; no force-push or published history rewrite. Remote push initially failed with configured-agent signing error; user explicitly requested retry, which succeeded without auth/config changes. No merge performed. Post-rebase validation rerun: client4024 passed/180 skipped/0 failed; graphics713 passed/1 skipped/0 failed; native8+8, generator and both NativeAOT executables pass; full combined production Linux client AOT publish succeeds at .dev-data/pr-preparation/client-aot. Logs .dev-data/pr-preparation/{client-tests,graphics-tests,native-aot-tests,full-client-aot}.log. User live acceptance precedes the base refresh, with the feature patch unchanged. Windows/macOS and remote CI remain unclaimed. The staged/uncommitted/local-only notes below are historical implementation handoffs, superseded by this publication checkpoint. User explicitly requests building the shared table after visually testing all three window migrations. Current full combined implementation is STAGED/UNCOMMITTED in /home/mathias/Projects/worktrees/engines-client-lua-integrated on feature/client-lua-window-migrations, HEAD3fcf250a5. These staged49 files are the intentional, user-approved integration baseline, not unrelated edits. Original worker trees must remain untouched. Offline/local Git only, no remote fetch/push/Gitea; no new commits authorized. Core.Table consolidation is implemented and verified; historical baseline/validation is below. USER FOLLOW-UP: also normalize Actions list mode to the same compact visual/interaction style as the other migrated lists: standard header/row heights, separate small icon column, shared typography/spacing/sort indicators, resizable persisted columns. Current Actions still configures Core.Table style=large, resize_columns=false, combined icon_text name cell and custom arrows/templates; replace that configuration rather than introducing another engine/style. Preserve action-specific Name/Cooldown fields, availability/cooldown/tooltips, captured activation and grid-mode behavior. Keep columns usable at the narrow Actions window size; do not simply copy widths that clip cooldown. Use common style/options and remove large Actions-only templates/style branches if no longer consumed. Complete alongside the Stats direct-menu correction, then validate actual input and re-test visuals. No production C# game-data changes or native table presenter unless evidenced. Shared component owns generic headers/columns, row/cell creation/reconciliation/destruction, binding/event cleanup, width constraints/dragging/persistence and sort state/indicators/ordering mechanics. Window packages supply column schemas, value formatting/comparators/grouping/tie behavior, row decoration/tooltip/enabled/opacity, row sizing/style and command callbacks. Core must contain no Actions/NCU/casting/removal/domain identifiers or policy. Preserve Nano search match-first+dimming, silent cast rows/slots and stable grid/list order; NCU right-release provenance, countdown/permanent ordering, hostile styling and original columns/width archives; Actions availability/cooldown/tooltip behavior and current list/grid flow. Preserve actual visual/user-tested differences such as row sizes through explicit component options, not copied engines or a giant domain switch. Before editing: snapshot current integration staged+working diff and nonignored new source hashes privately under .dev-data, so this user's tested baseline is recoverable. All file reads/edits/builds must target the INTEGRATED worktree, not the default cwd of the existing Shared Herdr pane. Adapt tests to assert public behavior/current shared component roles rather than preserving duplicated implementation wiring. Keep real native input, activation policy, lifecycle/quota and unchanged-snapshot allocation guarantees; no disabled failing checks or unsafe shortcuts. Reuse existing Core window/preferences and host capabilities; avoid speculative plugin frameworks or per-domain native exports. Validation: existing native input/window/list/Nano/NCU/Actions tests, new multi-instance/shared-table behavior as needed, full combined client+graphics, generator/native/AOT checks and full-client AOT publish if applicable. Baseline already passed client4017/180skip,graphics713/1skip, native8+8, sharedAOT and combinedLinux clientAOT publish; no need to repeat expensive identical work unnecessarily, but validate meaningful refactor. Native game-art/Windows/macOS/live behavior requires user testing again; preserve limitations. Update concise Core component docs. USER CORRECTION AFTER LIVE CHECK: Display options must be INLINE CHECKABLE ENTRIES IN THE TOP-LEFT MENU, not a Display options action that opens controls in the main Stats form. This supersedes the earlier panel-preservation interpretation and historical implementation notes below. Remove the Stats options panel and panel-open/close state entirely; directly list XP / SK, Alien XP (respect native expansion availability), Duel score, Solo score and Team score in the title-icon menu with synchronized per-bar checkmarks. Selecting an entry toggles the actual bar, not another form/submenu. Preserve native canonical values/formulas, chosen-bar state through close/reopen, content-driven height/resizable=false, placement/pin/open and disposal. No compact mode or Skills changes. Use generic menu support; add only a minimal generally useful visibility/availability capability if needed to retain expansion-dependent choices, not a Stats-specific C# presentation relay. Update actual-popup input/lifecycle/restoration/height tests accordingly, preserving existing shared-table behavior. User-tested baseline snapshot created before any source edits at ignored .dev-data/before-core-table-20261022T061418Z: staged.patch, working.patch, index/status/HEAD, changed-source archive and 7845 source hashes (52 paths with renames represented as delete/add). Original 49-entry staged migration baseline preserved byte-for-byte (current cached binary diff hash matches snapshot staged.patch); all implementation remains local in the integrated worktree. Historical first-pass implementation and validation (presentation details superseded by the current follow-up below): - All work stayed in the integrated tree on feature/client-lua-window-migrations, HEAD3fcf250a564b49919219c8be4e98ca3b1112f567. No remotes, commits, staging changes, original worker-tree edits or broad review. Original index and cached binary diff still exactly match the private pre-refactor snapshot. Refactor is unstaged modifications/deletions plus new files over the intentional 49-entry staged migration baseline; before any eventual authorized commit the coordinator must review and stage the combined FINAL working state, not commit the old index alone. - core.table now owns the only table.sort engine, shared XML headers/row/cell creation/reconciliation/destruction, generic bindings/button handlers, column constraints/native drag offsets, legacy width arrays, sort state/arrows and stable ordering. Table.create takes schema, compact/inset/large style, sizing/style options, binding/activate closures, row decorators and column value/text/icon/color callbacks. list:order(entries) exposes the same order to grid and list; list:show(entries,ordered) reuses it. Table.ordered(entries,policy) supports a separate grid policy without a second sorting engine. Group precedence is independent of direction; domain tie comparator then original-position fallback preserve stable ties. Per-instance preference prefixes/sort-state names support multiple independent tables while native services retain per-window scope. - Removed13 superseded engines/templates: Actions/action_row.lua and row.xml; Ncu/table.lua,header.xml,row.xml,icon_cell.xml,text_cell.xml; NanoPrograms/table.lua,table.xml,header.xml,row.xml,cell.xml,icon.xml. Main scripts now consume Core; NCU/Nano presentation files contain schemas/formatters/group/tie rules, not engines. Package grid renderers remain package-local and use shared ordering. No domain names/game calls exist in Core.Table; no native exports, production C# adapters, domain facts/formulas or activation policy were changed. Shared XML styles preserve actual existing row/icon/header/padding/font geometry, including Nano silent rows and NCU hostile names/right cancellation. Actions unavailable/cooldown/decorations and original grid/list flow remain tested. - Scaling/compatibility evidence: initial extra compact cell wrappers exceeded the unchanged widget quota with500 nanos. Direct compact text/icon templates retain original node economy and the500-nano regression passes. A new wide saved-column regression failed at1200->1000 before the Nano schema's width range was corrected to its existing supported extent; it now passes, including enlarged-window header/cell alignment. NCU's prior constraints and both legacy col_id/col_width archives remain preserved. - Stats Display options now exists only as a title-icon menu entry. Inline widget/handler removed; panel visibility and checkmarker synchronize in one Lua function. Close/Escape/session hiding collapse the panel without losing bar choices. Flexible-height/resizable=false, native placement/pin/open, expansion availability, bar tooltips and domain calculations are unchanged. Real-input Stats tests open/select the actual popup and assert its actual check graphic, not a ghost widget; disposal, restoration, scaled tooltips, choices and unchanged-update checks retained. Skills untouched. - Final automated validation: full client4019 passed,180 skipped,0 failed (baseline4017+two new regressions); graphics713 passed,1 skipped,0 failed. Focused initial consumer/shared/Stats run51 passed,3 skipped. ./run-client-lua-tests.sh passes Release8/8, ASan/UBSan8/8, generator self-tests and scripting/UI NativeAOT execution, including Actions consuming Core.Table with real XML/input/activation and allocation-free unchanged updates. Full combined production Linux x64 PRK.Client NativeAOT publish succeeds (EnableDevClient=false) at .dev-data/client-aot/core-table-linux-x64/PRK.Client. Its packaged Core.Table/Nano presentation/Stats scripts match final source, and the only published table.lua is Core/table.lua (no old list engines). This is a full-client publish, not a new live game run. - Negative controls: removing group precedence fails the real-input Nano match-first regression; substituting left for right release fails the independent table input test; removing Stats check synchronization fails the saved-placement popup regression. Wide saved-column red/green above also verified. All controls restored; final full suite clean. New LuaTableComponentTests verifies independent table schemas/widths/sorts/stable ties/decorators/button identity/native dragging/persistence and row/header callback destruction without disabling the other instance. Existing typed authorization/provenance/stale/session/no-observer-activation and unchanged-snapshot allocation regressions all pass. - Evidence under ignored .dev-data/integration-validation/: core-table-first.log, core-table-targeted.log, core-table-control-{group,button,stats-menu}.log, core-table-wide-column-{red,green}.log, core-table-validated-client.log (final4019/180), core-table-graphics.log, core-table-native-aot.log, core-table-full-client-aot.log and exit files. Final source hashes and the50 refactor paths relative to snapshot are core-table-final-source-sha256.json and core-table-refactor-paths.json. git diff --check clean; no private metadata/generated artifacts introduced into source. Core/README.md documents API/lifetime/ordering/styles/prefs and Stats menu; UI_XML.md Stats section updated. - Remaining gates/limits: Linux x64 containers only. Windows/macOS/remote CI, installed-game-art rendering and live visual/game interaction with this refactor remain unverified; user-tested visuals were the preserved pre-refactor baseline. Asset/native fixture skips are retained, not disabled. Shared AOT execution covers Actions/Core.Table; the combined client AOT was published but not launched through a live session exercising all windows. No claim that a publish alone verifies all runtime game behavior. CURRENT FOLLOW-UP OUTCOME — implementation/automated checks complete and user has now live-validated the final fixes, reporting that all looks correct. This accepts direct Stats menu choices and compact/unified Actions presentation; do not infer exhaustive platform or interaction coverage beyond that report. Still local, no commit/push/PR/merge permission. - Worked only in /home/mathias/Projects/worktrees/engines-client-lua-integrated, feature/client-lua-window-migrations, HEAD3fcf250a564b49919219c8be4e98ca3b1112f567. Current staged baseline (including the coordinator-staged first refactor) and working/new source were privately snapshotted BEFORE edits at .dev-data/before-menu-actions-followup-20261022T073822Z (binary staged/working patches, index/status/HEAD, changed-source archive and source hashes). Final index and cached patch match that snapshot exactly. Follow-up consists of21 working-tree additions/modifications/deletions; unchanged staging must be updated to the final combined working state before any future authorized commit. No reset/stash/clean/revert/commit/remote operations, broad review or original/retired worker-tree access. - Stats correction is now literal direct-menu behavior: XP / SK, Alien XP, Duel score, Solo score and Team score are flat checked icon-menu entries alongside Close Window. Each toggles its actual bar and check. Removed stats_options panel, all show_* content widgets, Display options intermediate action, panel-visible state and hide/reopen panel relay. Chosen flags remain Lua-owned and survive close/Escape/session hiding/reopen and expansion changes; Alien choice is hidden when canonical native state says unavailable. Existing native readings/formulas, expansion computation, content-height/resizable=false and saved placement/pin/open authority are unchanged. Real-input tests inspect actual menu checks and bar visibility, and restored height now grows/shrinks from toggling a real bar, not opening a panel. No Skills/compact-mode change. - Minimal shared menu API: ui.menu.visible(anchor,index,visible), using stable one-based handles from ui.menu.add. An owned menu tracks popup generations; actual visibility/check changes close only its anchor's popup and expire prior callbacks. Visible selection is consumed once; hidden/re-shown/released items cannot revive old callbacks. Menu callbacks still run through the existing nonactivating observer path. A retained stale native row was proven able to close another owner's popup before the fix; UiContextMenu now verifies that its row belongs to the currently open panel BEFORE closing/invoking it. No Stats-specific native relay, new game activation or native ABI expansion. New export/binding/docs are generated from typed metadata as usual. - Actions now uses the same compact19px headers/rows/fonts/spacing and shared triangular arrows as the other tables, with separate15px icon, Name and Cooldown cells. Name/Cooldown formatters, unavailable/cooldown/tooltip rules, captured native commands, sorting/grid order and grid layout remain unchanged. Name/Cooldown columns use common native drag/persistence; Actions' window services now wire the same scoped ReadPreferenceArray/WritePreferenceArray delegates used by the other migrated tables. - Shared responsive option: fit_columns=true plus table:set_width(availableWidth). Common engine retains preferred widths separately from fitted display widths, shrinks earlier columns only to declared minima and reserves other minima when dragging. Actions schema16px icon /75px name /90px cooldown with minima16/54/90 keeps cooldown usable at the existing222px minimum frame width. Narrowing/re-enlarging or an unmoved divider does not overwrite preferences. The unmoved-divider case was shown failing110->75 before its no-change guard, then green. NCU/Nano leave fit_columns off, retaining their original column geometry and archives. - Deleted the unused Actions large style branch, icon_text/flexible/custom header-cell/arrows plumbing and6 XML templates: table_large.xml, table_header_large.xml, table_header_small.xml, table_row_large.xml, table_icon_text.xml, table_text_right.xml. Still exactly one Core.Table ordering/reconciliation engine and the common compact/inset styles, no parallel Actions table implementation or window-type switches. - Red-green evidence: before implementation the three requested regressions fail for the retained Stats panel, Actions' two bespoke cells instead of3 compact cells, and absent ui.menu.visible. A separate stale-row owner-isolation test fails before the native live-panel guard. Verified failing policy controls: expose hidden menu items; omit Stats check synchronization; disable width fitting so cooldown clips. All restored. New generic menu test covers real popup input, hidden item absence, stable handles, stale hide/show/replay, one-use callbacks, destruction cleanup and protection of another owner's popup. Shared NativeAOT probe now executes visibility/stale menu observers and verifies they cannot authorize game commands. Existing NCU right-release and Nano silent cast/normal school sound, source identity/provenance and unchanged-update tests remain green. - Final validation: focused affected suite109 passed,3 asset skips,0 failed. Full combined client4021 passed,180 skips,0 failed; graphics713 passed,1 skip,0 failed. ./run-client-lua-tests.sh passes Release8/8, ASan/UBSan8/8, generator self-tests and scripting/shared UI NativeAOT execution (including compact Actions and owned dynamic menu observers). Full combined production Linux x64 client NativeAOT publish succeeds (EnableDevClient=false) at .dev-data/client-aot/menu-actions-linux-x64/PRK.Client. Final published Stats/Actions/Core.Table scripts match source; no large templates are published. Generated ui-menu.md includes ui.menu.visible. No separate window-specific harness/gates added. - Evidence is ignored under .dev-data/integration-validation/: menu-actions-red.log, menu-stale-owner-red.log, actions-unmoved-divider-red.log, menu-visibility-control.log, menu-actions-policy-controls.log, menu-actions-targeted.log, menu-actions-managed-aot.log, menu-actions-full-client.log, menu-actions-graphics.log, menu-actions-native-aot.log, menu-actions-full-client-aot.log. Current hashes and21-path report are menu-actions-final-source-sha256.json and menu-actions-followup-paths.json. git diff --check and source scans clean: controls restored, no private metadata/generated artifacts introduced, no old Stats panel or large-style plumbing remains in package source. Core/README.md, Packages/README.md and UI_XML.md reflect the corrected UI/API. - User live acceptance received after the latest fix: user states they validated it and all now looks correct. Local UI acceptance gate is satisfied; exact individual checks/platform were not specified, so no new Windows/macOS, remote CI or exhaustive live-interaction claim. Automated evidence remains Linux x64 with asset-backed render skips; shared AOT executes generic UI/Actions behavior and combined client AOT publish succeeds. Work remains local/uncommitted on feature/client-lua-window-migrations, with staged historical baseline plus unstaged final changes; any future authorized commit MUST stage/review the complete final working state, not the old index alone.
Checklist
5 of 5 complete- Snapshot the user-tested combined baseline and extract a coherent shared Lua table API from the three existing engines.
- Verify real-input sorting/dragging/prefs/activation, domain presentation, instance isolation/cleanup and relevant combined client/AOT checks.
- Implement one Core.Table plus reusable XML templates; migrate all three consumers and delete superseded list engines.
- Put Stats bar toggles directly in the top-left menu with per-bar checks and expansion availability; remove the main-form options panel and verify content height, choices and native lifecycle.
- Normalize Actions to the common compact table rows/headers/icon column, resizable saved columns and sort indicators; preserve narrow-window usability and gameplay behavior.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Chore
- Task ID
tsk_azukdf2zeh- Updated