Skip to content

Minor bug fixes#168

Draft
sacha-l wants to merge 3 commits into
developfrom
fix/minor-bug-fixes
Draft

Minor bug fixes#168
sacha-l wants to merge 3 commits into
developfrom
fix/minor-bug-fixes

Conversation

@sacha-l
Copy link
Copy Markdown
Collaborator

@sacha-l sacha-l commented May 23, 2026

Rolling draft for small bug fixes.

Fixes

  • Audio mute on mobile — the mute toggle relied on widget.setVolume(0), which is a no-op on mobile (iOS controls volume in hardware), so tapping mute kept playing at full volume. Mute now pauses / unmute plays (setVolume(100) still applied on desktop). Needs a real-device check.

  • Stable React keys on editable team + M2-agreement lists — the add/remove lists in TeamPaymentSection (editable members), UpdateTeamModal, and M2AgreementModal (core features / documentation / nice-to-have) keyed their controlled inputs by array index, so deleting a middle row reused the wrong DOM node and shifted focus/values onto a sibling row. Each row now carries a stable client-generated id (kept length-synced with its data) and is keyed by it.

  • TeamPaymentSection duplicate-key warning — the read-only member card keyed by member.walletAddress || index. Wallet addresses are not unique across a team's members (mock data redacts several to one string), so keying by address alone collided and tripped React's "two children with the same key" warning. The key now folds in the index.

  • Two debug console.log -> logger (server)project.controller.js used raw console.log for the updateProject payload preview and the M2-agreement confirmation; both now route through the existing logger util (info / success) like the rest of the controller.

Test plan / report

  • cd server && npm test — 293/293 passing
  • cd client && npm run build — clean (tsc + vite)
  • cd client && npm run lint — clean (--max-warnings 0)
  • Desktop: mute toggle flips with no console errors

stadium-tester — preview (mock mode)

stadium-git-fix-minor-bug-fixes preview · 5 scenarios: 3 pass, 0 fail, 2 skipped · window.__STADIUM_MOCK__ = true · 0 console errors

# Scenario Result Notes
1 Preview mock-mode sanity PASS __STADIUM_MOCK__ === true
2 Homepage / directory loads PASS #main-content visible, 0 console errors
3 Project page + team section render; no duplicate-key warning PASS /m2-program/plata-mia-15ac43 loads, team tab opens, 0 "same key" warnings, 0 console errors
4 Update Team modal: add 3 / type / delete middle keeps values SKIPPED (needs-auth-harness) SIWS-gated; VITE_USE_TEST_WALLET not active on preview
5 M2 Agreement modal: add / delete middle core feature keeps text SKIPPED (needs-auth-harness) SIWS-gated; VITE_USE_TEST_WALLET not active on preview

Caveats (what the tester does NOT prove):

  • React's duplicate-key warning only fires in dev builds; the preview is a prod build that strips it, so scenario 3's "no same-key warning" confirms a clean render but is not a true regression check. The fix is verified by the passing typecheck + the diff.
  • The focus-retention behavior of the editable-list fix (scenarios 4–5) was not exercised — those modals are SIWS-gated and skipped on a preview without the test-wallet harness.

Owner TODO (needs hardware / harness):

  • Mobile (real device): mute stops sound, unmute starts it
  • (optional) Re-run scenarios 4–5 against a VITE_USE_TEST_WALLET=true build to exercise focus retention

Draft -> develop.

The mute toggle relied on widget.setVolume(0), but volume is hardware-controlled
on mobile (notably iOS) where setVolume is a no-op — so tapping mute kept playing
at full volume. Mute now pauses and unmute plays (setVolume(100) on desktop);
play/pause honor the user's tap on every platform.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Jun 1, 2026 2:25pm

sacha-l added 2 commits June 1, 2026 16:25
Editable add/remove lists keyed their controlled inputs by array index, so
deleting a middle row reused the wrong DOM node and shifted focus/values onto
a sibling. Give each row a stable client-generated id (kept length-synced with
the data) and key by it. Also fold the index into TeamPaymentSection's
read-only member key: a wallet address is not unique across members (mock data
redacts several to one string), so keying by address alone collided and tripped
React's duplicate-key warning.
project.controller used raw console.log for the updateProject payload preview
and the M2-agreement confirmation; route them through the existing logger util
(info/success) like the rest of the controller.
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