Skip to content

Harden NPC profile UI loading - #649

Merged
RANGROO merged 1 commit into
unstablefrom
codex/npc-profile-load-reliability
Jul 31, 2026
Merged

Harden NPC profile UI loading#649
RANGROO merged 1 commit into
unstablefrom
codex/npc-profile-load-reliability

Conversation

@RANGROO

@RANGROO RANGROO commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Reject stale or deleted NPC profile modal requests with an explicit 404 response instead of rendering an empty editor.
  • Validate modal responses against the requested NPC ID and show a recoverable loading/error state.
  • Reset modal editing to the General tab when switching NPCs.
  • Ignore aborted or stale list refreshes and retain the current list when a refresh fails.

Problem

The NPC Profiles UI treated any iframe or list response as successful. A stale profile ID, incomplete response, overlapping request, or failed AJAX refresh could therefore appear as an empty or randomly unloaded profile with no visible explanation.

Validation

  • php -l ui/core/npc_master.php
  • git diff --check
  • Live browser: loaded two different NPC profiles and verified the requested names/IDs, General-tab reset, and page-2 AJAX pagination with 12 cards and no browser warnings.
  • Runtime probes: 20/20 valid modal requests returned the expected profile marker; 10/10 missing IDs returned a marked HTTP 404; 20/20 list requests returned complete pagination and card grids.
  • Runtime Apache log showed no new PHP warnings/errors.
  • Deployed the changed file locally to /var/www/html/HerikaServer and verified the deployed checksum and www-data:www-data ownership.

Review notes

This narrowly changes ui/core/npc_master.php, which also overlaps open PRs #594 and #634. No database migration, generated binary, or new test file is included.

@RANGROO
RANGROO marked this pull request as ready for review July 31, 2026 16:14
@RANGROO
RANGROO merged commit 602a9e4 into unstable Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant