Add MMO-style Trade Window permission/consent dialog with session mode#7
Merged
Add MMO-style Trade Window permission/consent dialog with session mode#7
Conversation
Co-authored-by: Maangled <108793241+Maangled@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add MMO-style Trade Window permission dialog
Add MMO-style Trade Window permission/consent dialog with session mode
Mar 18, 2026
This was referenced Mar 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a satirical cookie-consent parody dialog styled as an MMO item trade window that intercepts
localStoragewrites for first-time users, plus a session mode fallback for users who decline.Behavior
localStoragewrite or seal generationcompleteStage0()flowsessionMode = true; shows a persistent non-dismissible amber banner;saveProfile()becomes a no-op; page remains fully functional in memorysaveProfile()on acceptancecompleteStage1()runs (skipped in session mode)ferros_profileinlocalStorage) skip the dialog entirely — gated bylocalStorage.getItem('ferros_profile') === nullJS changes
let sessionMode = falseshowTradeDialog,closeTradeDialog,acceptTrade,enterSessionMode,acceptStorageFromSession,showCharSealConfirm,closeCharSealConfirmsaveProfile()early-returns whensessionModeis truecompleteStage0/completeStage1split into wrapper +_do*inner functions to support async callback injectionCSS / HTML additions
#session-banner— sticky amber top bar (non-dismissible)#trade-overlay/.trade-window— two-column MMO trade layout with@keyframes tradeGlowcyan border pulse; left col ("YOUR COMPUTER") lists storage facts, right col ("YOU") lists data provided#char-seal-overlay— minimal amber confirmation modal for Stage 1 sealOriginal prompt
Context
Repository:
Maangled/ferrosFile:
docs/personal-profile.html(onmainbranch)The file is a self-contained HTML document (embedded CSS + JS, zero external dependencies) designed as a gamified personal progression dashboard in the FERROS dark sci-fi/cyberpunk aesthetic. It uses
localStoragefor persistence and runs entirely offline viafile://protocol.Technical constraints:
docs/personal-profile.htmlfile://protocol — use the djb2-basedcomputeHash()fallback already in the file (nocrypto.subtledependency for new code), nofetch, no service workerslocalStorageis the only persistence mechanismTask
Add an MMO-style "Trade Window" permission/consent dialog that appears before any
localStoragewrites. This is a satirical take on cookie consent screens — FERROS stores nothing server-side and collects nothing.Behavior
First appearance: When the user clicks "Begin Setup" on Stage 0 (
completeStage0()), intercept the click and show the trade dialog BEFORE anylocalStoragewrites or seal generation. If the user accepts, proceed with the normalcompleteStage0()logic. If they decline, enter session mode.Session mode: If user clicks ❌ Decline:
sessionMode = true(never written to localStorage)⚠️ Session mode — progress will not be savedwith an[Accept Storage]button that re-opens the trade dialogsaveProfile()becomes a no-op in session modeCharacter creation seal confirmation: After the user fills out Stage 1 and clicks "Complete Setup →", show a second simpler confirmation modal: "Your character data will be sealed with a cryptographic hash and stored locally" with
[Seal & Continue]and[Cancel]buttons. Only proceed withcompleteStage1()logic after confirming. (This only appears if NOT in session mode.)Returning users: If
localStoragealready has a validferros_profileon page load, skip the trade dialog entirely (they already accepted previously).Trade Dialog Design
The dialog must be styled as an MMO item trade window with FERROS dark theme (glowing borders, item slot aesthetic). It should look like a trade interface from a fantasy/sci-fi game.
Layout: Two-column layout inside a wide modal/overlay:
Left column — "YOUR COMPUTER" header:
Right column — "YOU" header:
Tongue-in-cheek note below both columns (styled differently, italic or dimmed):
Two buttons at the bottom:
Accept Trade— glowing green/cyan styled buttonDecline— red/dim styled buttonVisual styling details:
--accent-cyanor--accent-amberglow)--bg-cardbackground with--border-dimborderCSS additions needed
Add new CSS classes for:
.trade-overlay— full-screen overlay (similar to#modal-overlaybut higher z-index).trade-window— the main trade box, wider than normal modal (max-width: 700px), with glowing border animation.trade-cols— grid with two equal columns and a dividing line/separator.trade-col— individual column with header.trade-col-header— styled header ("YOUR COMPUTER" / "YOU") in monospace, colored.trade-item— item slot row (icon + name + desc).trade-note— the satirical note section.trade-btn-accept— glowing accept button (green/cyan).trade-btn-decline— decline button (red/muted)@keyframes tradeGlowanimation for the border pulseJS additions needed
New state variable:
let sessionMode = false;New functions:
showTradeDialog(onAccept, onDecline)— renders and shows the trade overlaycloseTradeDialog()— hides the trade over...This pull request was created from Copilot chat.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.