Loom: validation conscience ribbon (top-right world health view)#273
Loom: validation conscience ribbon (top-right world health view)#273CoreyRDean wants to merge 1 commit into
Conversation
Adds an always-visible at-a-glance status group in the top-right corner
of the editor window, in the empty real estate of the menu bar (no
existing geometry shifts). Shows:
N unsaved · M issues · saved 2m ago [Issues...]
The "Issues..." button opens a hidden modal with a scrollable list of
findings, each clickable to jump straight to the offending entity via
GUE_JumpToEntity (the primitive added in the Ctrl+K palette PR).
v1 validator pass walks Items and Spells whose Script$ is set and
verifies the bound script still appears in CItemScript / CSpellScript
(the per-type comboboxes GUE builds at startup from
Data\Server Data\Scripts\*.rsl). This catches the most common kind of
broken reference: someone renamed or deleted a script file but the
entity still binds the old name.
The unsaved count reads GUE's existing per-tab dirty flags
(ItemsSaved, ActorsSaved, ZoneSaved, etc.). The "saved Nm ago"
timestamp is derived by snapshotting the OR of all 12 dirty flags
between updates and detecting True transitions -- no hooks into the
save buttons themselves, so the integration surface stays tiny.
Validator runs every ~3s; label refreshes every ~500ms. Both internally
throttled so the per-frame Conscience_Update call is essentially free.
Adding more validators is one ListAdd away (Conscience_AddFinding).
Future PRs can plug in missing-mesh / orphaned-portal / unused-asset
checks.
Branch is stacked on top of #271 (it uses GUE_JumpToEntity for the
"click a finding to jump" behavior).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5878a5c91
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| FUI_SendMessage(CR_Window, M_SHOW) | ||
| FUI_SendMessage(CR_Window, M_BRINGTOFRONT) |
There was a problem hiding this comment.
Use window open/close messages for findings modal
CR_Window is created with FUI_Window, but this code sends M_SHOW/M_HIDE to it. In this codebase, the window message handler only changes visibility on M_OPEN/M_CLOSE (see src/Modules/F-UI.bb window branch), so the findings modal does not reliably hide/show: it can remain visible after Conscience_CloseModal() and may not reopen correctly after titlebar close interactions. Switching these calls to window-specific messages will make modal visibility match CR_Open.
Useful? React with 👍 / 👎.
| FUI_SendMessage(cb, M_SETINDEX, i) | ||
| Local item = FUI_SendMessage(cb, M_GETSELECTED) | ||
| Local cap$ = Upper$(FUI_SendMessage(item, M_GETCAPTION)) | ||
| If cap$ = target$ Then Return True |
There was a problem hiding this comment.
Preserve combobox selection while validating scripts
The validator mutates live UI state by calling M_SETINDEX on CItemScript/CSpellScript for every lookup and never restoring the prior selection. Because Conscience_Validate() runs periodically, users editing items/spells can see the script dropdown jump to whichever index was last scanned, which is confusing and can lead to accidental edits. Snapshot and restore the combobox index (or inspect item captions without changing selection).
Useful? React with 👍 / 👎.
|
Closing this PR. Pivoting from "port Loom concepts into the existing GUE" to building a fresh |
Summary
Second of four PRs porting concepts from the Loom GUE redesign into the existing F-UI editor. Stacked on top of #271 (uses
GUE_JumpToEntityfrom that PR for click-to-jump on findings).Adds an always-visible status group in the top-right of the editor window:
Clicking
[Issues...]opens a modal with a list of findings; clicking a finding jumps straight to the offending entity.Why this placement
GUE's menu bar (Y=0..20) currently has just
FileandHelpon the left and acres of empty space on the right. Putting the ribbon there means zero coordinate churn for the 14 existing tabs and the thousands of inner gadgets that bottom-anchor offGUE_height. A bottom status bar would have required shrinkingTabMain's height and chasing every gadget that usesGUE_height - N.Validator (v1)
Walks
ItemsandSpellswhoseScript$is set and checks the script name still appears inCItemScript/CSpellScript(the per-type comboboxes GUE builds fromData\Server Data\Scripts\*.rslat startup). Catches the common case where a script was renamed/deleted but the binding still points at the old name.Adding more validators (missing meshes, orphaned portals, unused assets) is one
ListAddaway viaConscience_AddFinding(message$, jumpKind$, jumpRefID).Performance
Conscience_Updateso the per-frame call from the main loop is essentially freeSave-timestamp tracking
No hooks into the save buttons themselves. The module snapshots the 12 existing per-tab dirty flags (
ItemsSaved,ActorsSaved,ZoneSaved, etc.) into a bitfield each refresh; when the popcount goes up, a save just happened and we recordMilliSecs(). Tiny integration surface.Blast radius
src/Modules/ConscienceRibbon.bbsrc/GUE.bbgets four small hook lines (include, init, per-frame update, per-event dispatch)Server/Client/Project Manager/ Tools don't pull in the moduleVerification
GUE.execompiles cleanServer.exe,Client.exe,Project Manager.exeall compile cleanTest plan
All saved · 0 issues · no save yet1 unsaved · 0 issues · …All saved · 0 issues · just savedM issuesappearsIssues...— modal opens listing the finding🤖 Generated with Claude Code