Skip to content

feat: optionally hide artifact Exchange All button - #276

Merged
netniV merged 4 commits into
STFC-Mod:devfrom
Guffawaffle:feature/hide-artifact-exchange-all
Oct 4, 2026
Merged

netniV merged 4 commits into
STFC-Mod:devfrom
Guffawaffle:feature/hide-artifact-exchange-all

Conversation

@Guffawaffle

@Guffawaffle Guffawaffle commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds opt-in [ui].hide_artifact_exchange_all to hide the artifact exchange Convert All button while retaining individual exchanges. It defaults off; TOML changes require a restart.

Following #313, default-enabled [patches].artifactexchangehooks owns installation independently of visibility. The callback performs native binding once, then checks the current hide preference. Disabled behavior leaves native visibility intact. The button is read through validated reflected instance/reference metadata; complete unique bind and Unity helper signatures, checked managed invocation and detour success preserve native behavior when incompatible.

Validation: exact Windows release build and all 11 example TOMLs pass. Three independent reviews cover all 16 changed files. Static Windows270 evidence measures a 25-byte overwrite within the 452-byte bind extent. Exact-artifact popup reuse, feature-off/on and unrelated inventory behavior, plus supported Mac native extent/execution, remain unqualified. CI starts on publication without waiting for results.

@GingerNinja-STFC

Copy link
Copy Markdown
Contributor

@Guffawaffle I took the liberty of testing this on macOS as well. It's all looking good. 👌


macOS 26.6.2, Apple Silicon (Mac14,9), mod 1.1.7.1, branch @ 2331507c, releasedbg build with [ui] hide_artifact_exchange_all = true.

  • Hook installs cleanly (+ Patching 13 of 27 (ArtifactExchangeHooks) + hiding artifact Exchange All button, no API-resolution warnings); the patch is correctly absent when the setting is off
  • Exchange All button hidden in the shard popup; custom-amount individual exchange works; other inventory-use popups unaffected; toggle persists across restarts in both directions

@Guffawaffle

Guffawaffle commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Hook/feature alignment follow-up for #313

Follow-up to #313: keep hook installation independent of feature enablement, with default-enabled compatibility switches under [patches] and feature checks inside the installed hooks.

The registry currently gates ArtifactExchangeHooks directly on [ui].hide_artifact_exchange_all. Add an independent default-enabled [patches] switch, call native binding normally, then consult the feature setting before hiding the button. Retain the metadata checks and individual-exchange behavior. Update the restart wording if the resulting behavior no longer requires restarting. This is a standalone correction.

Published 5638de4: default-enabled artifactexchangehooks independently owns installation; native binding runs once before the hide preference and uses validated reflected field/managed helper contracts. Windows release build and all 11 example TOMLs passed; three independent lanes reviewed every changed file. Windows270 static fit is 25 bytes within a 452-byte extent. Exact-artifact popup/pooling smoke and supported Mac native extent/execution remain qualification gaps. New CI is queued; proceeding without waiting for results.

@netniV
netniV merged commit 861f772 into STFC-Mod:dev Oct 4, 2026
6 checks passed
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.

3 participants