Skip to content

move currency one level up in settings - #856

Merged
bordalix merged 7 commits into
masterfrom
move_currency_settings_up
Jul 27, 2026
Merged

bordalix merged 7 commits into
masterfrom
move_currency_settings_up

Conversation

@bordalix

@bordalix bordalix commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Moves Currency settings to top level of Settings.

Screenshot 2026-07-27 at 14 38 07

Summary by CodeRabbit

  • New Features

    • Added a dedicated currency icon for the settings UI.
    • Added a Currency option under Display settings.
  • Improvements

    • Removed the Currency row from the main Preferences list (the list now starts with Bitcoin Unit).
    • Updated automated navigation steps to select currency directly from the correct settings entry.
  • Tests

    • Adjusted e2e keyboard flows and Nostr config-save assertions to verify currency changes using the checked selection value.

@bordalix
bordalix requested a review from sahilc0 July 27, 2026 13:40
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: bac96fa
Status: ✅  Deploy successful!
Preview URL: https://dc08db58.arkade-wallet.pages.dev
Branch Preview URL: https://move-currency-settings-up.arkade-wallet.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@bordalix, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 81ef05cf-4a00-4060-95ee-6d60381380b3

📥 Commits

Reviewing files that changed from the base of the PR and between 68fd7e4 and bac96fa.

📒 Files selected for processing (10)
  • src/lib/types.ts
  • src/providers/options.tsx
  • src/screens/Settings/BitcoinUnit.tsx
  • src/screens/Settings/Currency.tsx
  • src/screens/Settings/Display.tsx
  • src/screens/Settings/General.tsx
  • src/screens/Settings/Index.tsx
  • src/screens/Settings/Menu.tsx
  • src/test/screens/settings/bitcoinUnit.test.tsx
  • src/test/screens/settings/fiat.test.tsx

Walkthrough

Currency is now a dedicated Display setting with a new icon. The Preferences layout removes its direct Currency row, and end-to-end flows navigate directly through the Currency option when selecting fiat currencies.

Changes

Currency settings

Layer / File(s) Summary
Currency option registration and layout
src/icons/CurrencyIcon.tsx, src/providers/options.tsx, src/screens/Settings/General.tsx
Adds the Currency SVG icon, registers Currency under Display, removes the BitcoinUnit catalog entry, and removes the Currency row from Preferences.
Direct currency selection flows
src/test/e2e/keyboard.test.ts, src/test/e2e/nostr.test.ts, src/test/e2e/utils.ts
Updates end-to-end flows to open Currency directly, select fiat currencies, and verify the checked currency input value.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • arkade-os/wallet#627: Introduces related settings-entry and navigation-helper changes used by these end-to-end flows.
  • arkade-os/wallet#713: Updates related currency display configuration and settings bindings.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: Currency settings were moved up to a top-level Settings row.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch move_currency_settings_up

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Deploying wallet-bitcoin with  Cloudflare Pages  Cloudflare Pages

Latest commit: bac96fa
Status: ✅  Deploy successful!
Preview URL: https://02b111bb.wallet-bitcoin.pages.dev
Branch Preview URL: https://move-currency-settings-up.wallet-bitcoin.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/icons/CurrencyIcon.tsx`:
- Around line 1-14: Update the CurrencyIcon SVG in CurrencyIcon to mark it as
decorative and exclude it from the accessibility tree, while preserving its
existing visual rendering and size behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c35f46fb-1212-4419-a886-2f89d7f30225

📥 Commits

Reviewing files that changed from the base of the PR and between 89965cf and b0820fe.

📒 Files selected for processing (6)
  • src/icons/CurrencyIcon.tsx
  • src/providers/options.tsx
  • src/screens/Settings/General.tsx
  • src/test/e2e/keyboard.test.ts
  • src/test/e2e/nostr.test.ts
  • src/test/e2e/utils.ts
💤 Files with no reviewable changes (4)
  • src/screens/Settings/General.tsx
  • src/test/e2e/utils.ts
  • src/test/e2e/keyboard.test.ts
  • src/test/e2e/nostr.test.ts

Comment on lines +1 to +14
export default function CurrencyIcon({ size = 20 }: { size?: number }) {
return (
<svg xmlns='http://www.w3.org/2000/svg' width={size} height={size} viewBox='0 0 24 24'>
<path
fill='none'
stroke='currentColor'
strokeLinecap='round'
strokeLinejoin='round'
strokeWidth='2'
d='m14.5 10l-.035-.139A2.457 2.457 0 0 0 12.082 8h-.522a1.841 1.841 0 0 0-.684 3.55l2.248.9A1.841 1.841 0 0 1 12.44 16h-.521a2.457 2.457 0 0 1-2.384-1.861L9.5 14M12 6v2m0 8v2m9-6a9 9 0 1 1-18 0a9 9 0 0 1 18 0Z'
/>
</svg>
)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Hide the decorative SVG from assistive technology.

This icon is rendered beside a text label, so mark it decorative to avoid an unlabeled SVG entering the accessibility tree.

Proposed fix
     <svg xmlns='http://www.w3.org/2000/svg' width={size} height={size} viewBox='0 0 24 24'
+      aria-hidden='true'
+      focusable='false'
     >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export default function CurrencyIcon({ size = 20 }: { size?: number }) {
return (
<svg xmlns='http://www.w3.org/2000/svg' width={size} height={size} viewBox='0 0 24 24'>
<path
fill='none'
stroke='currentColor'
strokeLinecap='round'
strokeLinejoin='round'
strokeWidth='2'
d='m14.5 10l-.035-.139A2.457 2.457 0 0 0 12.082 8h-.522a1.841 1.841 0 0 0-.684 3.55l2.248.9A1.841 1.841 0 0 1 12.44 16h-.521a2.457 2.457 0 0 1-2.384-1.861L9.5 14M12 6v2m0 8v2m9-6a9 9 0 1 1-18 0a9 9 0 0 1 18 0Z'
/>
</svg>
)
}
export default function CurrencyIcon({ size = 20 }: { size?: number }) {
return (
<svg xmlns='http://www.w3.org/2000/svg' width={size} height={size} viewBox='0 0 24 24' aria-hidden='true' focusable='false'>
<path
fill='none'
stroke='currentColor'
strokeLinecap='round'
strokeLinejoin='round'
strokeWidth='2'
d='m14.5 10l-.035-.139A2.457 2.457 0 0 0 12.082 8h-.522a1.841 1.841 0 0 0-.684 3.55l2.248.9A1.841 1.841 0 0 1 12.44 16h-.521a2.457 2.457 0 0 1-2.384-1.861L9.5 14M12 6v2m0 8v2m9-6a9 9 0 1 1-18 0a9 9 0 0 1 18 0Z'
/>
</svg>
)
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/icons/CurrencyIcon.tsx` around lines 1 - 14, Update the CurrencyIcon SVG
in CurrencyIcon to mark it as decorative and exclude it from the accessibility
tree, while preserving its existing visual rendering and size behavior.

Source: Coding guidelines

@sahilc0

sahilc0 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

lgtm

@arkana-ai-bot arkana-ai-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental review since 68fd7e4 (through 316ffc3). No protocol-critical code touched — settings UI only.

Blocking

  • src/providers/options.tsx:179-187 — stray debug console.log('getParentOption', { section, parent: ... }) was introduced in this update inside getParentOption. It fires on every settings back-navigation and duplicates the ternary immediately below. Please remove before merge. eslint doesn't have no-console, so it slipped through Danger/CI.

Nit (non-blocking)

  • src/screens/Settings/Display.tsx:12 — the file was renamed from General.tsx to Display.tsx but the default export is still function General(). Rename the component to Display (or whatever matches the section) to avoid confusion for future readers; the containing enum now has both SettingsSections.Display and SettingsOptions.Display, and having the component identifier disagree with the filename makes greps and stack traces misleading.

Everything else in the incremental diff (section rename Display→General/Config→Display, file rename Fiat→Currency and Display→BitcoinUnit, test renames, Menu label update) is a clean mechanical rename and looks consistent — enum members are updated everywhere they're referenced, allOptions uses the new SettingsSections.General, Menu.tsx filters by General, and the Index.tsx switch maps each option to the correct new component.

@arkana-ai-bot arkana-ai-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental review 316ffc3 → 88dc411. Only change is the removal of the stray console.log in src/providers/options.tsx getParentOption that I flagged as blocking last round — thanks, that's resolved.

Non-blocking nit from the previous review is still open: src/screens/Settings/Display.tsx:12 still exports function General() after the file rename. Worth fixing whenever convenient (misleading in stack traces / greps) but not merge-blocking.

No protocol-critical code touched in this delta.

@arkana-ai-bot arkana-ai-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental review 88dc411 → bac96fa. Single one-line change: src/screens/Settings/Display.tsx:12 renames export default function General() to export default function Display(), resolving the non-blocking nit from my previous review. Component identifier now matches filename and the surrounding SettingsSections.Display / SettingsOptions.Display naming.

No protocol-critical code touched in this delta. No further findings from me.

@bordalix
bordalix merged commit 4fc3062 into master Jul 27, 2026
8 checks passed
@bordalix
bordalix deleted the move_currency_settings_up branch July 27, 2026 18:27
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