Migrate the Skills window to shared XML/Lua UI
Outcome: migrate Skills presentation to a bundled XML/Lua package without changing IP costs/caps, preview math, suggestion allocation, packet behavior, reset eligibility or current user flow. Implementation started on dedicated feature/client-lua-skills from origin/develop 422ef097a after confirming a clean working tree. User subsequently authorized committing the completed work. Native SkillDraft.SetTarget/AffordableMaximum and GUI-independent SkillEditingSession now implement the agreed widget-independent target-value boundary; initial target test observed red then green. Skills XML/Lua presentation is integrated with native close/session/request policy, typed generated capabilities and generic repeat/slider observers. Real text and native Slider callbacks stage the same native draft while submit/reset remain activation-protected. Existing Shift/remaining-IP/discard tests migrated to scripted input. Shared SkillsCategories.xml (ImpactGroups consumer) and SkillRow.xml (graphics consumer) are retained; obsolete presenter/window route and unused fragments removed. Linux NativeAOT acceptance now source-links the production Skills adapter/session/draft and dependencies, not just the Lua package, and passes without new warning suppressions. Implementation and applicable automated validation are complete; committed with user permission as a18f93cdb (feature: Migrate Skills to shared Lua UI) on feature/client-lua-skills. User authorized /open-pr and explicitly approved including two subsequent commits: 8ec9b4bec (Remove bad .editorconfig) and aa838ccd0 (Run a lua formatter). All three commits are pushed on feature/client-lua-skills with upstream configured; working tree is clean. PR #2817 merged: https://git.project-rk.com/prk/engines/pulls/2817 (feature/client-lua-skills → develop). User confirmed all changes merged and verified on all platforms. Work is complete. PR-head validation at aa838ccd0: full client 4107 passed / 161 skipped; graphics 713 passed / 1 skipped; native Release and ASan/UBSan 8/8 each, generator tests and both NativeAOT executables pass with warnings as errors. Formatter verification compared normalized luac5.4 compiler listings for all 15 files: instructions, constants, locals and upvalues match after removing source-line/address metadata. Initial stripped-bytecode comparison differed because function source line ranges remain encoded; it was not used as behavioral evidence. One earlier full test run hit a SQLite disposed-handle error in RdbStatCalculationTests; all seven isolated cases and the final full rerun pass, with no test disabled. Initial isolated retry lacked a writable results-directory argument; corrected runner invocation passes. This transient is disclosed in the PR, not reclassified as a proven baseline issue. Merge-tree against origin/develop cedf3c2f5 succeeds without conflicts; this is not validation of a merged tree. User subsequently confirmed merged-result verification on all platforms, superseding the earlier platform/live validation gap. A separate full-client AOT publish was not specifically claimed. Final verification after the Compact View menu change: full client suite 4107 passed / 161 skipped / zero failures; graphics suite 713 passed / 1 skipped / zero failures, with compiler warnings treated as errors. ./run-client-lua-tests.sh passed native 8/8 Release and 8/8 ASan/UBSan, generator self-tests and both Linux NativeAOT executables. Skills AOT source-links the actual production adapter, native editing session, draft and generated capabilities; real input stages a target, switches through the I menu, submits the validated native draft and tears down without retaining callbacks. Warmed 1000-frame unchanged updates allocate zero managed bytes in both managed and AOT regressions. The initial target-value regression was observed failing then passing. Mutation controls fail when removing draft-revision submission validation, confirmation reconciliation, held-gesture cancellation or genuine Save activation; the activation-only control specifically proves a no-op native slider observer cannot submit a currently valid draft reference. All controls were restored before final runs. Real text and Slider tests prove local staging and genuine Save remain separate; tests also cover Shift/release, preview/invalid targets, canonical suggestions, preliminary echo/final confirmation, stale stats/equipment resets, dirty close/cancel/discard/menu routes, forced hiding, script faults and preservation of pending native requests. Rendered and visually inspected expanded, compact, confirmation and I-menu views using installed art. The checked Compact View option toggles both ways without changing draft state; footer buttons are removed and the option is hidden during a native confirmation. Final full-client reproduction uses prk-client-tests:10.0 with repository at /src, cache /nuget, results /test-results, complete installation mounted read-only at /game and PRK_GUIROOT=/game/cd_image/gui/Default. PRK_INSTALL_ROOT/PRK_DATAROOT were not set; other installation/native-dependent fixtures remain skipped. Automated session validation did not include manual live-game or Windows/macOS execution; the user subsequently confirmed merged-result verification on all platforms. A separate new full-client AOT publish was not specifically claimed. Static feature review returned no verified findings but was PARTIAL: correctness did not review the deleted SkillsPresenter diff; other reviewers covered all 44 changed diffs. It did not execute validation and is not presented as a clean approval. An earlier review was aborted by the user's menu follow-up. A concurrently interrupted build reported missing generated Lua artifacts; the final sequential generator/native/AOT/client/graphics runs all passed. git diff --check passes. Evidence and fresh renders are archived under .dev-data/skills-validation/. Pre-migration evidence: UI/Windows/SkillsPresenter.cs mixed category/row composition, compact mode, formatting, SkillDraft editing, suggestion staging, reset validation, confirmation closures and close vetoes. Character/Stats/{SkillDraft,SkillRules}.cs already own purchase/preview/cost rules. SessionState/ClientSkillRequests.cs owns serialized submission, preliminary echo vs authoritative confirmation, partial acceptance, timeout/refresh lockout and reset completion. CharacterInterface.BuildSkills validates current gameplay session/identity immediately before sending. GuiButtonRepeater owns physical presses, native-clock repeat scheduling and Shift-on-press semantics. LuaWidgetHost currently exposes click/right-release callbacks but no held-repeat, modifier-aware press or scroll-reset capability. UiWindowHandle.CanClose already provides native close vetoes; all ordinary close routes must retain it. Agreed boundary: Lua chooses the editing interaction and proposes target purchased/base values to a native draft. C# accepts or refuses the proposal and returns authoritative draft facts. Local staging is not permission to submit packets. Preserve the existing built-in editing controls for this migration, but do not constrain the API to +/- buttons: sliders and text inputs must be able to use the same capability. User follow-up: expanded/compact switching belongs in the top-left I menu as a checked Compact View toggle, not footer buttons. Both directions use that menu; compact geometry drops the removed footer row. Hide the mode option while a native confirmation is active. Ownership: - Lua/XML: category grouping and selected row, expanded/compact mode and geometry, row/suggestion composition, colors/bars/numeric formatting, scroll positions, and rendering confirmation/status facts. Reuse existing Skills XML structure, Core.Window and generic widget APIs; do not force +/-/bar rows into the unrelated icon-grid or table schemas. - Native GUI-independent skill-editing session: one SkillDraft owner; reconcile authoritative stats/inventory/request state; stage edits and suggestions; evaluate save/reset eligibility and refusal reasons; own pending confirmation intent and its lifetime; handle discard/close policy. Extract this domain responsibility from SkillsPresenter, not another C# row presenter. Retain SkillRules, SkillPresentationData text/ipdist loading and ClientSkillRequests rather than duplicating rules or a second pending-operation state machine. - Native host backends: generic physical input/capture/modifiers/repeat timing, window/session/placement/pin lifecycle, text measurement/rendering and bounded generated Lua capabilities. Lua maps these events to draft targets; input APIs must not embed Skills-specific increment/decrement behavior. No raw networking, live-stat mutation, CLR exposure or Lua-calculated purchase packets. Data/command boundary: - Native sends a catalog plus revision-gated batched facts for all 75 skills: names/descriptions, current/purchased/unbuffed/preview values, deltas, computed costs/caps/cost tier, remaining IP/reset counters, availability/refusal/status facts, staged suggestion changes and current confirmation description. Lua chooses presentation, not rule computations. Unknown values remain explicit rather than invented zeros. Native suggestion ordering must preserve current equal-priority allocation behavior independently of Lua grouping/sorting. - Local draft capability: propose a target purchased/base value for a native-issued skill reference, independent of widget type. C# validates finite integral input, known editable skill/session, saved-value lower bound, native caps, total affordability and current editing/request/confirmation state before staging. Invalid proposals are refused without partial mutation; return the actual draft state and refusal reason. Do not accept buffed/display totals as purchased values. Reuse/extend SkillDraft's native cost/preview calculations rather than replaying one-point edits or trusting Lua-computed prices. Provide native affordable-maximum and restore-saved operations so Shift behavior does not duplicate budget math in Lua. Suggested distribution is another native draft-staging operation. - Draft proposals may come from drag, text-edit, press/repeat or ordinary click callbacks. They do not require or confer network-command activation: these local observer/event paths cannot Save or Reset. Skill references identify native skill/edit-session membership, not a particular +/- button, and survive valid local draft changes. Reconcile/revoke them on authoritative owner/session changes and check current editing eligibility on every proposal. Cancel held interactions on hidden/rebound/mode/modal transitions without turning physical gestures into the domain editing API. - Save and reset remain separate typed, operation-specific capabilities requiring matching genuine user activation and native validation. Save submits the native validated draft, never Lua-provided final packets, and is bound to the draft revision represented by its submit reference; changing the draft inside a handler cannot silently authorize a different submission. Reset preparation/confirmation use native eligibility and single-use intent/target references, invalidated by authoritative stat/inventory/request changes, intervening draft edits, replacement, hiding/session change or teardown. Revalidate canonical facts and current identity/session at execution, not just projected enabled flags. Resetting saved IP is never expressed as a draft target below its saved value. Two bridge/lifecycle integration areas: 1. Expose only the generic package-owned input capabilities needed to preserve existing press/repeat/Shift behavior, reusing/extending GuiButtonRepeater rather than creating a Skills-specific edit-input API. Lua turns each event into a target-value proposal or native affordable-maximum/restore-saved request. Shift captured on the original press produces one bulk draft edit, with no repeats or extra release edit. Release, reset, hidden/disabled/destroyed/rebound controls, category/mode/modal transitions, package failure and session changes cancel held eligibility. Drag/text observers must be able to stage draft proposals without being promoted to network activation; retain strict activation accounting for Save/Reset. Add only necessary scoped input cancellation/scroll-reset support; no broad input framework rewrite. Prove a non-click editor can use the same draft capability, but do not add a slider/input field to the shipped Skills layout unless separately requested. 2. Native CanClose handles Close button, title-menu, toggle and other ordinary close requests uniformly. Dirty drafts produce a native discard-close intent instead of closing; Lua only renders it. Confirmed discard clears local draft then closes, never spends IP. Forced session hiding discards local drafts and revokes intents without relying on Lua or blocking logout. Projection/notification flushing stays deferred until Lua returns. Native intent blocks editing even if Lua hides its dialog. Package failure revokes local edits/repeats/confirmations, preserves pending native requests and permits diagnostic closure without a broken-Lua veto or reviving the C# presenter. Acceptance: preserve expanded/compact categories, all skills including legacy read-only purchase behavior, descriptions and buff/cost presentation; one-point/held/Shift editing and unsaved-only undo through a widget-independent target-value API, usable by drag/text editors without adding new built-in controls; native cost/cap/budget enforcement and trickle preview; current deterministic suggested staging without sending until Save; exact submission/echo/confirmation/partial/timeout behavior and displayed remaining IP while pending; current individual/full-reset/equipment/counter rules and native confirmation; discard-on-close, cancel/reopen and session lifecycle; no stale or repeated input can change another skill, confirm a replaced question or submit twice. Missing rule/text/suggestion data degrades without invented facts. Remove obsolete SkillsPresenter/layout route only after replacement passes; keep helpers used by other windows. Validation: reuse SkillTestFixture, SkillDraftTests, ClientSkillRequestsTests, SkillSuggestionDataTests and migrate SkillShiftClickTests to the real scripted UI. Red/green real input and native service/request tests must cover click and non-click target proposals through the same draft API, invalid/below-saved/unaffordable targets leaving the draft unchanged, affordable-maximum/restore-saved behavior, held/Shift/release semantics, budgeted suggestion staging, preview propagation, drag/text/projection callbacks unable to submit/reset, Save bound to the represented draft revision, preliminary echo/final response, stale reset confirmation after stats/equipment changes, dirty close/cancel/discard/reopen, forced hiding and failure while a request remains pending. Include mutation controls for identity/intent/repeat guards, unchanged-update allocation gating, rendered expanded/compact/modal views with installed assets and Lua/native/generator/AOT validation including Skills package coverage. Report platform/full-client-AOT/live limitations honestly. No implementation, task progress or checklist completion during planning.
Checklist
5 of 5 complete- Extract and verify GUI-independent target-value draft editing, affordable-maximum/restore-saved operations, suggestion staging and confirmation/close policy over existing SkillDraft, SkillRules and ClientSkillRequests.
- Add typed Skills facts and widget-independent draft proposals usable from click, drag and text input, plus generic press/repeat/Shift support; keep revision-bound Save and reset confirmation separately activation-authorized.
- Implement expanded/compact Skills XML/Lua presentation with categories, details/preview/suggestions, native confirmation intents and a checked Compact View toggle in the top-left I menu instead of footer mode buttons.
- Integrate all ordinary close routes, forced session hiding, persistence and fault cleanup without losing pending native request state; remove the legacy presenter/layout route and update documentation.
- Pass real-input red/green and mutation regressions for click/non-click target editing, invalid targets leaving drafts unchanged, preview/suggestions, revision-bound submit, stale confirmations and repeat cancellation; run client/graphics/Lua/native/AOT checks and inspect existing expanded/compact/modal layouts.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Feature
- Task ID
tsk_wtpz2f9zrn- Updated