[PR #1815] [MERGED] Replace UI explicit any usage #5286

Closed
opened 2026-10-22 04:14:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1815
Author: @Xelvanis
Created: 6/1/2026
Status: ✅ Merged
Merged: 6/1/2026
Merged by: @Xelvanis

Base: refactor ← Head: chore/ui-explicit-any-types-followup


📝 Commits (2)

  • d1a5836 Replace UI explicit any usage
  • 68a02a0 Fix reviewer normalization findings

📊 Changes

25 files changed (+337 additions, -157 deletions)

View changed files

📝 src/app/shell/ChatSidebar.tsx (+8 -4)
📝 src/engine/modes/game/prompts/gm-prompts.ts (+1 -1)
📝 src/features/catalog/agents/regex-application.ts (+4 -0)
📝 src/features/catalog/characters/components/CharacterListRow.tsx (+7 -2)
📝 src/features/catalog/characters/hooks/use-characters-panel-data.ts (+7 -2)
📝 src/features/catalog/characters/lib/characters-panel-model.ts (+24 -14)
📝 src/features/modes/conversation/components/ChatConversationSurface.tsx (+1 -1)
📝 src/features/modes/conversation/components/ConversationAutonomousEffects.tsx (+1 -1)
📝 src/features/modes/conversation/components/ConversationInput.tsx (+10 -4)
📝 src/features/modes/conversation/components/ConversationMessage.tsx (+3 -13)
📝 src/features/modes/conversation/components/ConversationModeRoute.tsx (+6 -4)
📝 src/features/modes/conversation/components/ConversationView.tsx (+16 -12)
📝 src/features/modes/game/api/game-api.ts (+27 -10)
📝 src/features/modes/game/hooks/use-game.ts (+28 -11)
📝 src/features/modes/roleplay/components/ChatRoleplayPanels.tsx (+17 -10)
📝 src/features/modes/roleplay/components/ChatRoleplaySurface.tsx (+22 -10)
📝 src/features/modes/roleplay/components/EncounterModal.tsx (+26 -3)
📝 src/features/modes/roleplay/components/RoleplayModeRoute.tsx (+5 -1)
📝 src/features/modes/router/components/RecentChats.tsx (+19 -4)
📝 src/features/modes/shared/chat-ui/components/ChatInput.tsx (+9 -3)

...and 5 more files

📄 Description

Linked issue

N/A

Why this change

  • Remove remaining explicit any usage across the UI cleanup slice so stricter linting can move forward without weakening runtime guards.

What changed

  • Narrowed chat metadata, character metadata, sprite expression metadata, and conversation message props from any to unknown plus local readers.
  • Replaced game HUD, weather, RPG attribute, and related metadata casts with typed helpers.
  • Preserved author-notes depth compatibility for numeric-string metadata while removing the explicit any cast.

Refactor impact

Primary owner:

  • Shared mode UI, roleplay mode, conversation mode, game mode, catalog character UI, app shell, and shared chat display helpers.

Impact areas reviewed:

  • Chat metadata parsing and metadata sync.
  • Character row parsing and preview metadata.
  • Roleplay author notes, scene metadata, and group response metadata.
  • Conversation input regex mode handling and message props.
  • Game API utility readers and HUD widget normalization.

Boundary notes:

  • No new cross-layer imports.
  • Engine touch is limited to game prompt HUD config typing.
  • Feature code continues to use existing catalog/shared API hooks.
  • No Rust or remote-runtime path changes.

Pressure points touched:

  • Shared mode UI hooks were touched for metadata narrowing only.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • pnpm check passes locally before PR push/handoff, including the unused-code check
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Browser screenshot/recording evidence added when UI/browser state is the claim
  • Remote runtime smoke checked when relevant

Validation evidence:

  • pnpm typecheck passed before rebase.
  • pnpm check:architecture passed before rebase.
  • pnpm check passed after rebase onto origin/refactor.

Manual verification notes

  • Not run; this is a typed metadata cleanup with command-line validation.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Internal type cleanup and metadata compatibility guard only; no new discoverable feature.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

Docs/release notes:

  • No docs changes needed; no changelog file exists and this does not add user-facing discovery or release content.

UI evidence

  • Not applicable; no visual UI change.

Summary by CodeRabbit

  • Refactor
    • Improved internal type safety and validation logic across chat, character management, and game systems to enhance code reliability and consistency.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1815 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/1/2026 **Status:** ✅ Merged **Merged:** 6/1/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `chore/ui-explicit-any-types-followup` --- ### 📝 Commits (2) - [`d1a5836`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d1a5836f6c2214b358ed32d6747dd057b3e59d6c) Replace UI explicit any usage - [`68a02a0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68a02a06500cb0a5225a18cfe05cc8874e465d83) Fix reviewer normalization findings ### 📊 Changes **25 files changed** (+337 additions, -157 deletions) <details> <summary>View changed files</summary> 📝 `src/app/shell/ChatSidebar.tsx` (+8 -4) 📝 `src/engine/modes/game/prompts/gm-prompts.ts` (+1 -1) 📝 `src/features/catalog/agents/regex-application.ts` (+4 -0) 📝 `src/features/catalog/characters/components/CharacterListRow.tsx` (+7 -2) 📝 `src/features/catalog/characters/hooks/use-characters-panel-data.ts` (+7 -2) 📝 `src/features/catalog/characters/lib/characters-panel-model.ts` (+24 -14) 📝 `src/features/modes/conversation/components/ChatConversationSurface.tsx` (+1 -1) 📝 `src/features/modes/conversation/components/ConversationAutonomousEffects.tsx` (+1 -1) 📝 `src/features/modes/conversation/components/ConversationInput.tsx` (+10 -4) 📝 `src/features/modes/conversation/components/ConversationMessage.tsx` (+3 -13) 📝 `src/features/modes/conversation/components/ConversationModeRoute.tsx` (+6 -4) 📝 `src/features/modes/conversation/components/ConversationView.tsx` (+16 -12) 📝 `src/features/modes/game/api/game-api.ts` (+27 -10) 📝 `src/features/modes/game/hooks/use-game.ts` (+28 -11) 📝 `src/features/modes/roleplay/components/ChatRoleplayPanels.tsx` (+17 -10) 📝 `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` (+22 -10) 📝 `src/features/modes/roleplay/components/EncounterModal.tsx` (+26 -3) 📝 `src/features/modes/roleplay/components/RoleplayModeRoute.tsx` (+5 -1) 📝 `src/features/modes/router/components/RecentChats.tsx` (+19 -4) 📝 `src/features/modes/shared/chat-ui/components/ChatInput.tsx` (+9 -3) _...and 5 more files_ </details> ### 📄 Description ## Linked issue N/A ## Why this change - Remove remaining explicit `any` usage across the UI cleanup slice so stricter linting can move forward without weakening runtime guards. ## What changed - Narrowed chat metadata, character metadata, sprite expression metadata, and conversation message props from `any` to `unknown` plus local readers. - Replaced game HUD, weather, RPG attribute, and related metadata casts with typed helpers. - Preserved author-notes depth compatibility for numeric-string metadata while removing the explicit `any` cast. ## Refactor impact Primary owner: - Shared mode UI, roleplay mode, conversation mode, game mode, catalog character UI, app shell, and shared chat display helpers. Impact areas reviewed: - Chat metadata parsing and metadata sync. - Character row parsing and preview metadata. - Roleplay author notes, scene metadata, and group response metadata. - Conversation input regex mode handling and message props. - Game API utility readers and HUD widget normalization. Boundary notes: - No new cross-layer imports. - Engine touch is limited to game prompt HUD config typing. - Feature code continues to use existing catalog/shared API hooks. - No Rust or remote-runtime path changes. Pressure points touched: - Shared mode UI hooks were touched for metadata narrowing only. ## Validation - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [x] `pnpm check` passes locally before PR push/handoff, including the unused-code check - [x] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Browser screenshot/recording evidence added when UI/browser state is the claim - [ ] Remote runtime smoke checked when relevant Validation evidence: - `pnpm typecheck` passed before rebase. - `pnpm check:architecture` passed before rebase. - `pnpm check` passed after rebase onto `origin/refactor`. ### Manual verification notes - Not run; this is a typed metadata cleanup with command-line validation. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Internal type cleanup and metadata compatibility guard only; no new discoverable feature. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims Docs/release notes: - No docs changes needed; no changelog file exists and this does not add user-facing discovery or release content. ## UI evidence - Not applicable; no visual UI change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Improved internal type safety and validation logic across chat, character management, and game systems to enhance code reliability and consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:56 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5286
No description provided.