feat(rust): write the recommended PopupNotifications banner (runicnpc 9e, D327, D328) #39

Merged
whitlocktech merged 1 commits from feat/9e-popup-banner into edge 2026-10-09 06:29:51 +00:00
Member

What & why

RunicNPC stage 9e, step 1 (docs/runicnpc/PLAN.md). The 9d player session settled on a PopupNotifications look: a banner across the top of the screen (left 0.15, bottom 0.87, width 0.7, height 0.07, spacing 0.005), no close button, Roboto Condensed Bold at 18, panel transparency 0.8.

install --game rust and update --game rust now write that look to PopupNotifications.json in the framework's config directory (oxide/config or carbon/configs). They write it only where:

  • the file is missing, or
  • every setting still equals PopupNotifications 0.2.1's own defaults. Version is ignored and numbers are compared as numbers (D328, all or nothing).

A config with any setting changed, or one that does not parse, is kept whole and never merged into. The file always carries PopupNotifications' Version (the existing file's version is kept), because the plugin resets a config without one to its defaults on load. The plan prints a popup look row naming the case. uninstall never touches the file.

New module: src/rustgame/popup.rs.

Docs: RunicGateway/docs PR for 9e step 1 (rust-link/INSTALL.md, INTEGRATION.md §2.4).

How it was tested

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test all pass: 188 tests, 5 of them new in popup.rs. The new tests cover:
    • a missing config;
    • the rig's real defaults file;
    • a later version being kept;
    • 12.0 == 12;
    • four kinds of change;
    • a config that is not JSON;
    • an existing banner.
  • Ran the binary with RUNICGATEWAY_STATE_DIR against two scratch server roots. No published bundle carries RunicNPC yet, so for this run only I bypassed the RunicNPC check in the working tree (never committed). Results:
    • Oxide with no config: the banner was written.
    • Carbon with the rig's defaults: the result is exactly the banner file used in the walk.
    • update after the Carbon font was changed to 14: both configs kept ("Already on bundle — nothing moved").
  • The run from a real bundle comes in 9e step 3 (the cutover).

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why RunicNPC stage 9e, step 1 (docs/runicnpc/PLAN.md). The 9d player session settled on a PopupNotifications look: a banner across the top of the screen (left 0.15, bottom 0.87, width 0.7, height 0.07, spacing 0.005), no close button, Roboto Condensed Bold at 18, panel transparency 0.8. `install --game rust` and `update --game rust` now write that look to `PopupNotifications.json` in the framework's config directory (`oxide/config` or `carbon/configs`). They write it only where: - the file is **missing**, or - **every** setting still equals PopupNotifications 0.2.1's own defaults. `Version` is ignored and numbers are compared as numbers (D328, all or nothing). A config with any setting changed, or one that does not parse, is kept whole and never merged into. The file always carries PopupNotifications' `Version` (the existing file's version is kept), because the plugin resets a config without one to its defaults on load. The plan prints a `popup look` row naming the case. `uninstall` never touches the file. New module: `src/rustgame/popup.rs`. Docs: RunicGateway/docs PR for 9e step 1 (`rust-link/INSTALL.md`, `INTEGRATION.md` §2.4). ## How it was tested - `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and `cargo test` all pass: 188 tests, 5 of them new in `popup.rs`. The new tests cover: - a missing config; - the rig's real defaults file; - a later version being kept; - `12.0 == 12`; - four kinds of change; - a config that is not JSON; - an existing banner. - Ran the binary with `RUNICGATEWAY_STATE_DIR` against two scratch server roots. No published bundle carries RunicNPC yet, so for this run only I bypassed the RunicNPC check in the working tree (never committed). Results: - Oxide with no config: the banner was written. - Carbon with the rig's defaults: the result is exactly the banner file used in the walk. - `update` after the Carbon font was changed to 14: both configs kept ("Already on bundle — nothing moved"). - The run from a real bundle comes in 9e step 3 (the cutover). ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-09 06:25:23 +00:00
feat(rust): write the recommended PopupNotifications banner (runicnpc 9e, D327, D328)
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 2m5s
0db3a8ac73
install and update write PopupNotifications.json into the framework's config
directory, as a banner across the top of the screen, only where the file is
missing or every setting is still PopupNotifications 0.2.1's own default (the
Version aside, numbers compared as numbers). A config with any setting
changed, or one that does not parse, is kept whole. The file carries the
plugin's Version, because PopupNotifications resets a config without one to
its defaults on load. The plan prints a "popup look" row naming the case.

Run against two scratch roots (a temporary local bypass of the RunicNPC check,
since no published bundle carries RunicNPC yet): Oxide with no config got the
banner; Carbon at the rig's defaults got the walk's banner file exactly; on
update a hand-changed config and an existing banner were both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit bd73930584 into edge 2026-10-09 06:29:51 +00:00
whitlocktech deleted branch feat/9e-popup-banner 2026-10-09 06:29:52 +00:00
Sign in to join this conversation.
No description provided.