Select the next Lua UI migration after Friends
Planning only in the current clean engines checkout. Inspect remaining native UI against existing Lua package capabilities and recommend the next bounded migration after Friends. No implementation or repository edits. Acceptance: source-backed candidate comparison, clear presentation/native ownership, reuse opportunities, risks and behavior-focused validation; explicitly identify unrun validation. Recommendation: NPC conversation as one replaceable prk.npc-chat provider covering transcript, responses, Desc/Info/Give/Shop bar and hand-over panel. Preserve npcchat_window identity. NpcChatPresenter owns composition, paragraph grouping/naming/colors, wrapping, response dimming, trade instruction visibility and slot arrangement; NpcChatController owns ServerDrivenWindow, packet dispatch, returned-item restoration, item drops/tooltips and sibling panel docking. ClientKnubotState already owns revisioned conversation/trade snapshots and command validation. Lua should own paragraph grouping/prefixes/colors, answer presentation, frame and attached panel composition and item-slot decoration. Native retains AOML decoding/rendering, snapshot state, item and answer references, physical activation, current-context validation, credit parsing/capping, drop policy, tooltips, inventory restoration and server-driven close. Reuse core.window/core.icon_grid, existing native item bindings, CreditsText, typed API generation and provider fallback; no second dialogue state machine. Extend shared window attachment support only as needed to keep panels following drag/resize, visibility and stacking without native package-control name assumptions. Add bounded rich-text presentation over existing Aoml/AomlRuns rather than Lua parsing. Exact API shape remains an implementation-design step. Critical risks: answer index alone is not a stable action reference after server answers/NPC change; capture current conversation/answer context and invalidate held gestures on replacement. Existing state Answer validates index/current open state but not the context originally pressed. Credit changes must be capped at current native cash at activation, not just presenter edit time. Server-updated responses/trade controls must work in combat with native physical authority; choose explicit role-scoped policy rather than blindly copying action-grid lockdown. Preserve native close semantics through close/menu/Escape/session hiding/provider failure and restore unresolved items only once. Attached panels must not outlive package failure/close. Alternatives: CompassPresenter is small but uses GuiPannedSurface offset/sprite markers per frame and would require a new rendering capability, unlike a normal widget migration. MarketPresenter fields/constructor mix async completion queue, generation, debounce and idempotency with UI; extract native request state first. These are not fully audited alternatives. Validation plan: migrate existing NpcChatPresenterTests to real Lua/native input, preserve transcript line grouping/AOML/wrapping/autoscroll, answer waiting and Give/Shop visibility, trade prompt/slots/dimming/credits/drops/tooltips. Reproduce stale answer/NPC replacement and cash-change regressions red-green; exercise combat response updates, panel drag/resize/stack/hide, server close and teardown inventory restoration. Run client/graphics suites and run-client-lua-tests.sh including AOT, then inspect real-client dialogue and turn-in. No implementation/build/tests/live gameplay performed in this planning pass. Evidence opened: full NpcChatPresenter, NpcChatController, CompassPresenter, package README, core README, LuaWidgetHost.Presentation and trade component contract; first 260 lines ClientKnubotState, first 200 TradePresenter and first 140 MarketPresenter. Search-only: remaining native UI file inventory, NpcChatPresenterTests test names, CharacterInterface call sites and Lua rich-text/export declarations. Clean initial git status; repository untouched.
Checklist
0 of 0 completeNo checklist items.
- Area
- Project Rubi-Ka
- Project
- engines
- Kind
- Research
- Task ID
tsk_yyar6em4ry- Updated