Repository navigation
feat: implement new shortcut bar design with Spend button - #736
Conversation
- Add MCP configuration section to CLAUDE.md - Add MCP-CONFIGURATION-GUIDE.md with detailed setup instructions - Add verify-mcp.sh script to test MCP server connectivity - Document Figma Dev Mode MCP server setup for design extraction
- Add new Spend shortcut type that navigates to Where to Spend feature - Update shortcut bar to show 4 different states based on balance and passphrase verification: 1. Zero balance + Not verified: Backup, Receive, Buy & Sell, Spend 2. Zero balance + Verified: Receive, Send, Buy & Sell, Spend 3. Has balance + Verified: Receive, Send, Scan, Spend 4. Has balance + Not verified: Backup, Receive, Send, Spend - Replace PNG icons with SVG for better scaling (Spend and Scan buttons) - Update Scan button with new QR code design from Figma - Bump version to 8.4.3 - Document SVG usage and shortcut implementation in CLAUDE.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
WalkthroughAdds MCP documentation and a verification script; bumps app MARKETING_VERSION to 8.4.3; replaces shortcut raster assets with SVGs; introduces a new "Spend" shortcut and maps it in UI; refactors shortcut generation into four explicit states. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HomeView
participant HomeVM as HomeViewModel
participant Shortcuts
participant HomeVC as HomeViewController
User->>HomeView: Open home screen
HomeView->>HomeVM: Request shortcuts
alt No Balance & Needs Backup
HomeVM->>HomeVM: Build [secureWallet, receive, buySellDash, spend]
else No Balance & No Backup
HomeVM->>HomeVM: Build [receive, payToAddress, buySellDash, spend]
else Has Balance & No Backup
HomeVM->>HomeVM: Build [receive, payToAddress, scanToPay, spend]
else Has Balance & Needs Backup
HomeVM->>HomeVM: Build [secureWallet, receive, payToAddress, spend]
end
HomeVM-->>HomeView: Return shortcuts
User->>Shortcuts: Tap "Spend"
Shortcuts->>HomeVC: invoke showExploreDash()
HomeVC-->>User: Navigate to "Where to Spend"
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (7)📚 Learning: 2025-09-05T04:46:12.717ZApplied to files:
📚 Learning: 2025-10-02T16:19:48.485ZApplied to files:
📚 Learning: 2025-10-02T16:19:48.485ZApplied to files:
📚 Learning: 2025-09-05T04:46:21.894ZApplied to files:
📚 Learning: 2025-08-25T21:01:26.493ZApplied to files:
📚 Learning: 2025-10-02T16:19:48.485ZApplied to files:
📚 Learning: 2025-10-02T16:19:48.485ZApplied to files:
🔇 Additional comments (3)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.claude/verify-mcp.sh (1)
1-132: Good implementation of MCP configuration verification with minor improvements suggested.The script provides comprehensive validation and helpful user guidance. A few refinements would improve robustness and clarity.
.claude/agents/MCP-CONFIGURATION-GUIDE.md (1)
1-283: LGTM! Comprehensive MCP configuration guide.This documentation provides excellent coverage of MCP server setup, troubleshooting, and best practices. The guide includes practical examples, verification scripts, and clear explanations that will help developers configure MCP servers successfully.
Optional: Add language identifier to fenced code block.
Line 71 has a fenced code block without a language identifier. While this works, adding a language identifier improves syntax highlighting and follows best practices.
Apply this diff to add the language identifier:
MCP tools follow a specific naming pattern: -``` +```text mcp__<server-name>__<tool-name></blockquote></details> <details> <summary>CLAUDE.md (1)</summary><blockquote> `466-477`: **Minor markdown formatting issue.** Line 466 has spaces inside emphasis markers which violates markdown best practices. Apply this diff to fix the formatting: ```diff -**Root Cause:** The Xcode project has a build phase script called "Run Script - clang-format" that automatically formats all Objective-C files (*.h, *.m, *.mm) during builds. This script adds an unwanted blank line after the return statement in the `logoutURLString` method. +**Root Cause:** The Xcode project has a build phase script called "Run Script - clang-format" that automatically formats all Objective-C files (\*.h, \*.m, \*.mm) during builds. This script adds an unwanted blank line after the return statement in the `logoutURLString` method.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Scan QR 1.pngis excluded by!**/*.pngDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Scan QR.pngis excluded by!**/*.pngDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Scan QR@2x 1.pngis excluded by!**/*.pngDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Scan [email protected]is excluded by!**/*.pngDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Scan QR@3x 1.pngis excluded by!**/*.pngDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Scan [email protected]is excluded by!**/*.pngDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/scan.svgis excluded by!**/*.svgDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_spend.imageset/spend.svgis excluded by!**/*.svg
📒 Files selected for processing (9)
.claude/agents/MCP-CONFIGURATION-GUIDE.md(1 hunks).claude/verify-mcp.sh(1 hunks)CLAUDE.md(6 hunks)DashWallet.xcodeproj/project.pbxproj(20 hunks)DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Contents.json(1 hunks)DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_spend.imageset/Contents.json(1 hunks)DashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swift(1 hunks)DashWallet/Sources/UI/Home/Views/HomeViewModel.swift(1 hunks)DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swift(3 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{swift,h,m}
📄 CodeRabbit inference engine (CLAUDE.md)
Use 4-space indentation and keep lines under 180 characters (100 recommended)
Files:
DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swiftDashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swiftDashWallet/Sources/UI/Home/Views/HomeViewModel.swift
**/*.swift
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.swift: Avoid wholesale use of @objcMembers; expose only needed members (enforced by custom SwiftLint rule)
Avoid conditional compilation inside SwiftUI ViewBuilder expressions; use computed properties to encapsulate conditions
Prefer closure-based initialization for dictionaries when using conditional compilation to avoid syntax errors
Do not place #if conditionals mid-boolean expressions; assign to a conditional variable instead
Never force-unwrap latitude or longitude; use guard-let with error handling for coordinate values
Avoid force-unwraps of runtime properties (e.g., lastBounds!); prefer guard or optional binding with error handling
Use compactMap with explicit return types when creating map annotations to avoid type inference issues
Add explicit closure return type annotations when generic type inference fails
For location-based queries, first filter by rectangular bounds (SQL optimization), then apply precise circular distance filtering in memory
When using rectangular SQL bounds for circular searches, expand bounds by 50% to avoid excluding valid results before applying circular filtering
Wrap debug logging in #if DEBUG blocks and prefer a debugLog helper; avoid raw print statements in release paths
After removing debug prints, ensure switch cases are not left empty; add break or remove the case
Prefer os.Logger (os_log) for production-safe logging over print
Files:
DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swiftDashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swiftDashWallet/Sources/UI/Home/Views/HomeViewModel.swift
{DashWallet/Sources/UI,SwiftUI Components}/**/*.swift
📄 CodeRabbit inference engine (CLAUDE.md)
{DashWallet/Sources/UI,SwiftUI Components}/**/*.swift: Enforce View-ViewModel separation in SwiftUI: Views remain lightweight and delegate business logic to ViewModels
Use SwiftUI NavigationStack and navigationDestination for new screens
Files:
DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swiftDashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swiftDashWallet/Sources/UI/Home/Views/HomeViewModel.swift
**/*.{swift,m}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{swift,m}: Set template images to render with .withRenderingMode(.alwaysTemplate) where appropriate (e.g., SVG icons)
Use the kDefaultRadius constant (32000m) instead of hardcoded radius values
Files:
DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swiftDashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swiftDashWallet/Sources/UI/Home/Views/HomeViewModel.swift
**/*ViewController*.{swift,h,m}
📄 CodeRabbit inference engine (CLAUDE.md)
Do not add new UIViewController subclasses with UI logic; use thin UIHostingController wrappers when UIKit integration is required
Files:
DashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swift
🧠 Learnings (14)
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m : Avoid committing whitespace-only changes to DWUpholdMainnetConstants.m; restore if only whitespace changed
Applied to files:
DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Contents.jsonDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_spend.imageset/Contents.jsonDashWallet/Sources/UI/Home/Views/HomeViewModel.swiftDashWallet.xcodeproj/project.pbxprojCLAUDE.md
📚 Learning: 2025-09-05T04:46:12.717Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 728
File: DashWallet.xcodeproj/project.pbxproj:1595-1599
Timestamp: 2025-09-05T04:46:12.717Z
Learning: In iOS projects, the `DashWallet.xcodeproj/project.pbxproj` file is automatically generated and managed by Xcode. Manual changes to this file should not be made, and the changes shown in diffs are typically the result of Xcode updating project configuration, dependencies, or build settings.
Applied to files:
DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Contents.jsonDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_spend.imageset/Contents.jsonDashWallet.xcodeproj/project.pbxprojCLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/*.{swift,m} : Set template images to render with .withRenderingMode(.alwaysTemplate) where appropriate (e.g., SVG icons)
Applied to files:
DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Contents.jsonDashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_spend.imageset/Contents.jsonCLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to {DashWallet/Sources/UI,SwiftUI Components}/**/*.swift : Use SwiftUI NavigationStack and navigationDestination for new screens
Applied to files:
DashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swiftDashWallet/Sources/UI/Home/Views/HomeViewModel.swiftCLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to {DashWallet/Sources/UI,SwiftUI Components}/**/*.swift : Enforce View-ViewModel separation in SwiftUI: Views remain lightweight and delegate business logic to ViewModels
Applied to files:
DashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swiftDashWallet/Sources/UI/Home/Views/HomeViewModel.swiftCLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/Info.plist : Use $(MARKETING_VERSION) in Info.plist instead of hardcoded version strings; never edit versions directly in Info.plist
Applied to files:
DashWallet.xcodeproj/project.pbxprojCLAUDE.md
📚 Learning: 2025-09-05T04:46:21.894Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 728
File: DashWallet.xcodeproj/project.pbxproj:3174-3180
Timestamp: 2025-09-05T04:46:21.894Z
Learning: Xcode project files (.pbxproj) are automatically generated by Xcode and should not be manually edited. Hash changes in Pod library references (like libPods-dashwallet.a) are normal and occur when CocoaPods updates or when Xcode regenerates the project structure.
Applied to files:
DashWallet.xcodeproj/project.pbxprojCLAUDE.md
📚 Learning: 2025-08-25T21:01:26.493Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 723
File: DashWallet/da.lproj/Localizable.strings:2987-2987
Timestamp: 2025-08-25T21:01:26.493Z
Learning: The DashWallet project uses Transifex for translation management rather than direct manual edits to .lproj/Localizable.strings files.
Applied to files:
DashWallet.xcodeproj/project.pbxprojCLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to DashWalletScreenshotsUITests/**/*.swift : Place UI tests in DashWalletScreenshotsUITests/ for App Store screenshot generation
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/*.{swift,h,m} : Use 4-space indentation and keep lines under 180 characters (100 recommended)
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/*.{h,m} : Follow the NYTimes Objective-C Style Guide for Objective-C code
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to DashWalletTests/**/*.swift : Keep unit tests under DashWalletTests/ using XCTest with testable imports and mocks for isolation
Applied to files:
CLAUDE.md
📚 Learning: 2025-09-27T15:36:10.803Z
Learnt from: bfoss765
Repo: dashpay/dashwallet-ios PR: 732
File: DashWallet/Sources/Models/Explore Dash/Services/DashSpend/PiggyCards/PiggyCardsRepository.swift:21-23
Timestamp: 2025-09-27T15:36:10.803Z
Learning: In PiggyCardsRepository.swift, there's an ACL mismatch (public static let shared in an internal class) and potential thread safety concerns that will be addressed during dedicated PiggyCards development rather than in the current UI improvements PR.
Applied to files:
CLAUDE.md
📚 Learning: 2025-09-27T23:33:40.458Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 732
File: DashWallet/Sources/Models/Explore Dash/Services/DashSpend/PiggyCards/PiggyCardsEndpoint.swift:25-32
Timestamp: 2025-09-27T23:33:40.458Z
Learning: PiggyCards API getGiftCard endpoint uses an invalid path "gift-cards/\(txid)" that doesn't exist on the server (marked with TODO comment). The correct path should likely be "orders" with query parameters following the CTX API pattern, since PiggyCards uses "orders" for purchases while CTX uses "gift-cards" for both purchase and retrieval operations.
Applied to files:
CLAUDE.md
🧬 Code graph analysis (1)
DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swift (1)
DashWallet/Sources/UI/Views/UIButton+Dash.swift (1)
image(21-29)
🪛 LanguageTool
.claude/agents/MCP-CONFIGURATION-GUIDE.md
[grammar] ~140-~140: Use a hyphen to join words.
Context: ...ich npx npx --version ``` ### Figma MCP Specific Issues 1. **"Figma not running...
(QB_NEW_EN_HYPHEN)
[grammar] ~224-~224: Use a hyphen to join words.
Context: ...pment 1. Figma Dev Mode - Design to code conversion 2. GitHub MCP - Repo...
(QB_NEW_EN_HYPHEN)
🪛 markdownlint-cli2 (0.18.1)
.claude/agents/MCP-CONFIGURATION-GUIDE.md
71-71: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
CLAUDE.md
466-466: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
🪛 SwiftLint (0.57.0)
DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swift
[Warning] 101-101: Prefer object literals over image and color inits
(object_literal)
🔇 Additional comments (15)
.claude/verify-mcp.sh (3)
9-9: Use conventional path quoting instead of escaped spaces.For better readability and consistency with Bash idioms, use
$HOMEwith quoted paths rather than escaped spaces:-CONFIG_FILE=~/Library/Application\ Support/Claude/claude_desktop_config.json +CONFIG_FILE="$HOME/Library/Application Support/Claude/claude_desktop_config.json"Also update the echo fallback on line 20:
-echo " cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOF'" +echo " cat > \"\$HOME/Library/Application Support/Claude/claude_desktop_config.json\" << 'EOF'"
41-41: Broaden error message filtering for JSON validation.The grep filter
"^Expecting"may not capture all error formats frompython3 -m json.tool. Consider showing all error output to aid debugging:- python3 -m json.tool "$CONFIG_FILE" 2>&1 | grep -v "^Expecting" + python3 -m json.tool "$CONFIG_FILE" 2>&1This provides complete error context without filtering, making it easier for users to diagnose JSON issues.
110-114: Remove unreachable redundant configuration check.Lines 110–114 perform duplicate validation that is already enforced earlier (line 32 exits if config file is missing; line 49 reports if Figma MCP is not found). This defensive double-check is unreachable after the first exit:
# Determine if restart is needed -ALL_GOOD=true -if [ ! -f "$CONFIG_FILE" ]; then - ALL_GOOD=false -elif ! grep -q "figma-dev-mode" "$CONFIG_FILE" 2>/dev/null; then - ALL_GOOD=false -fi +ALL_GOOD=true +# Config file and figma-dev-mode presence already validated above +if ! grep -q "figma-dev-mode" "$CONFIG_FILE" 2>/dev/null; then + ALL_GOOD=false +fiThis simplifies logic and removes the dead code path for the file-not-found condition.
CLAUDE.md (4)
5-22: LGTM! Critical git workflow policy clearly documented.The new git workflow policy explicitly requires user permission before commits/pushes, with clear examples of authorization phrases. This is an important safeguard for AI-assisted development workflows.
27-86: LGTM! MCP configuration guidance aligns with detailed guide.The MCP server configuration section provides clear setup instructions and troubleshooting guidance. This aligns well with the detailed MCP-CONFIGURATION-GUIDE.md added in this PR.
353-443: LGTM! SVG usage guidelines support the icon migration.The comprehensive icon and asset management guidelines document the correct SVG implementation pattern, including the 4-state shortcut bar implementation. This directly supports the SVG icon migration in this PR (scan.svg and spend.svg).
Key points correctly documented:
- SVG properties:
preserves-vector-representationandtemplate-rendering-intent- Four shortcut states based on wallet balance and backup status
- Icon asset locations and implementation patterns
1153-1404: LGTM! Comprehensive CTX/DashSpend API integration documentation.The CTX API integration section thoroughly documents environment differences, field name variations, authentication requirements, and response structure differences between staging and production. This is valuable reference material for developers working with the CTX integration.
Key topics well-covered:
- Base URL differences (HTTPS for both environments)
- Field name differences (
savingsPercentagevsuserDiscount)- Authentication requirements (staging requires auth, production doesn't)
- Response structure differences (paginated vs direct)
- Multi-provider database architecture
DashWallet/Sources/UI/Home/HomeViewController+Shortcuts.swift (1)
53-54: LGTM! Spend action properly wired to navigation.The new
.spendcase correctly navigates to the "Where to Spend" feature by callingshowExploreDash(), consistent with the.exploreaction. The implementation follows the established pattern for shortcut action handlers.DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_spend.imageset/Contents.json (1)
1-16: LGTM! SVG asset correctly configured for template rendering.The asset configuration properly sets both
preserves-vector-representationandtemplate-rendering-intentproperties, ensuring the spend icon scales perfectly and adapts to the app's tint colors. This follows the SVG best practices documented in CLAUDE.md.DashWallet/Sources/UI/Home/Views/Shortcuts/Models/ShortcutAction.swift (3)
37-37: LGTM! Spend action type added to enum.The new
.spendcase extends the shortcut action types appropriately.
100-104: LGTM! Icon mapping follows established pattern.The icon mapping for
.spendloads "shortcut_spend" using the same guard-fatalError pattern as other shortcut types. This fail-fast approach ensures missing assets are caught during development.Note: SwiftLint suggests using object literals (
#imageLiteral), but the current pattern is consistent across all cases in this file and is the standard approach for dynamic image loading.
148-149: LGTM! Localized title follows guidelines.The title mapping for
.spendreturns a properly localized string with the required translation comment noting the 24-symbol maximum length constraint.DashWallet/Resources/AppAssets.xcassets/Shortcuts/shortcut_scanToPay.imageset/Contents.json (1)
1-16: LGTM! Successful migration from PNG to SVG.The scan shortcut icon has been properly migrated from raster (PNG) to vector (SVG) format. The configuration correctly sets
preserves-vector-representationandtemplate-rendering-intentproperties, ensuring perfect scaling and proper tint color adaptation. This aligns with the SVG best practices documented in CLAUDE.md.DashWallet/Sources/UI/Home/Views/HomeViewModel.swift (2)
499-499: LGTM! Proper use of constant for capacity reservation.Replacing the hardcoded
2withmaxShortcutsCountensures consistency with the actual number of shortcuts (4) being appended in each state.
501-528: LGTM! Excellent refactor to explicit 4-state logic.The shortcut generation logic has been significantly improved by replacing nested conditionals with 4 explicit state branches. Each state is clearly documented and produces a fixed set of 4 shortcuts based on wallet balance and backup status. This matches the requirements documented in the PR objectives and CLAUDE.md.
State verification:
- State 1 (no balance + needs backup): Backup, Receive, Buy & Sell, Spend ✓
- State 2 (no balance + verified): Receive, Send, Buy & Sell, Spend ✓
- State 3 (has balance + verified): Receive, Send, Scan, Spend ✓
- State 4 (has balance + needs backup): Backup, Receive, Send, Spend ✓
The explicit branching makes the logic much easier to understand and maintain compared to nested conditionals.
HashEngineering
left a comment
There was a problem hiding this comment.
en.lproj/Localizable.strings needs to have a "Spend" entry. this way "Spend" can be translated into other languages with Transfex.
Added "Spend" entry to Localizable.strings so the new Spend shortcut button
can be translated into other languages via Transifex.
The ShortcutAction.swift already uses NSLocalizedString("Spend", ...) so it will
automatically pick up the translations once they're provided.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
…rized commits Updated both CLAUDE.md and AI-DEVELOPMENT-GUIDE.md with much stronger and clearer language about the critical requirement to NEVER commit or push without explicit user permission. Changes include: - Added prominent visual markers (emojis, bold text) to catch attention - Declared this the #1 rule and #1 user complaint - Provided concrete examples of violations vs correct behavior - Listed specific phrases that grant permission - Made it absolutely clear there are NO EXCEPTIONS to this rule This addresses the recurring issue where AI assistants commit changes without waiting for user permission. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.claude/agents/AI-DEVELOPMENT-GUIDE.md (1)
37-48: Specify language for fenced code block.The code fence at line 39 lacks a language identifier. Add
bashortextto improve markdown compliance.-``` +```bash 1. Make code changes as requested 2. Show the changes (git diff or explanation) 3. ✋ FULL STOP - WAIT for user permission 4. Only commit/push when user EXPLICITLY says:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.claude/agents/AI-DEVELOPMENT-GUIDE.md(1 hunks)CLAUDE.md(6 hunks)DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{h,m}
📄 CodeRabbit inference engine (CLAUDE.md)
Follow the NYTimes Objective-C Style Guide for Objective-C code
Files:
DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m
**/*.{swift,h,m}
📄 CodeRabbit inference engine (CLAUDE.md)
Use 4-space indentation and keep lines under 180 characters (100 recommended)
Files:
DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m
DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m
📄 CodeRabbit inference engine (CLAUDE.md)
Avoid committing whitespace-only changes to DWUpholdMainnetConstants.m; restore if only whitespace changed
Files:
DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m
**/*.{swift,m}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{swift,m}: Set template images to render with .withRenderingMode(.alwaysTemplate) where appropriate (e.g., SVG icons)
Use the kDefaultRadius constant (32000m) instead of hardcoded radius values
Files:
DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m
🧠 Learnings (14)
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.m : Avoid committing whitespace-only changes to DWUpholdMainnetConstants.m; restore if only whitespace changed
Applied to files:
DashWallet/Sources/Models/Uphold/DWUpholdMainnetConstants.mCLAUDE.md
📚 Learning: 2025-09-05T04:46:12.717Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 728
File: DashWallet.xcodeproj/project.pbxproj:1595-1599
Timestamp: 2025-09-05T04:46:12.717Z
Learning: In iOS projects, the `DashWallet.xcodeproj/project.pbxproj` file is automatically generated and managed by Xcode. Manual changes to this file should not be made, and the changes shown in diffs are typically the result of Xcode updating project configuration, dependencies, or build settings.
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to {DashWallet/Sources/UI,SwiftUI Components}/**/*.swift : Use SwiftUI NavigationStack and navigationDestination for new screens
Applied to files:
CLAUDE.md
📚 Learning: 2025-08-25T21:01:26.493Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 723
File: DashWallet/da.lproj/Localizable.strings:2987-2987
Timestamp: 2025-08-25T21:01:26.493Z
Learning: The DashWallet project uses Transifex for translation management rather than direct manual edits to .lproj/Localizable.strings files.
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to {DashWallet/Sources/UI,SwiftUI Components}/**/*.swift : Enforce View-ViewModel separation in SwiftUI: Views remain lightweight and delegate business logic to ViewModels
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/*.{swift,m} : Set template images to render with .withRenderingMode(.alwaysTemplate) where appropriate (e.g., SVG icons)
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to DashWalletScreenshotsUITests/**/*.swift : Place UI tests in DashWalletScreenshotsUITests/ for App Store screenshot generation
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/Info.plist : Use $(MARKETING_VERSION) in Info.plist instead of hardcoded version strings; never edit versions directly in Info.plist
Applied to files:
CLAUDE.md
📚 Learning: 2025-09-05T04:46:21.894Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 728
File: DashWallet.xcodeproj/project.pbxproj:3174-3180
Timestamp: 2025-09-05T04:46:21.894Z
Learning: Xcode project files (.pbxproj) are automatically generated by Xcode and should not be manually edited. Hash changes in Pod library references (like libPods-dashwallet.a) are normal and occur when CocoaPods updates or when Xcode regenerates the project structure.
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/*.{swift,h,m} : Use 4-space indentation and keep lines under 180 characters (100 recommended)
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to **/*.{h,m} : Follow the NYTimes Objective-C Style Guide for Objective-C code
Applied to files:
CLAUDE.md
📚 Learning: 2025-10-02T16:19:48.485Z
Learnt from: CR
Repo: dashpay/dashwallet-ios PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-02T16:19:48.485Z
Learning: Applies to DashWalletTests/**/*.swift : Keep unit tests under DashWalletTests/ using XCTest with testable imports and mocks for isolation
Applied to files:
CLAUDE.md
📚 Learning: 2025-09-27T15:36:10.803Z
Learnt from: bfoss765
Repo: dashpay/dashwallet-ios PR: 732
File: DashWallet/Sources/Models/Explore Dash/Services/DashSpend/PiggyCards/PiggyCardsRepository.swift:21-23
Timestamp: 2025-09-27T15:36:10.803Z
Learning: In PiggyCardsRepository.swift, there's an ACL mismatch (public static let shared in an internal class) and potential thread safety concerns that will be addressed during dedicated PiggyCards development rather than in the current UI improvements PR.
Applied to files:
CLAUDE.md
📚 Learning: 2025-09-27T23:33:40.458Z
Learnt from: HashEngineering
Repo: dashpay/dashwallet-ios PR: 732
File: DashWallet/Sources/Models/Explore Dash/Services/DashSpend/PiggyCards/PiggyCardsEndpoint.swift:25-32
Timestamp: 2025-09-27T23:33:40.458Z
Learning: PiggyCards API getGiftCard endpoint uses an invalid path "gift-cards/\(txid)" that doesn't exist on the server (marked with TODO comment). The correct path should likely be "orders" with query parameters following the CTX API pattern, since PiggyCards uses "orders" for purchases while CTX uses "gift-cards" for both purchase and retrieval operations.
Applied to files:
CLAUDE.md
🪛 markdownlint-cli2 (0.18.1)
.claude/agents/AI-DEVELOPMENT-GUIDE.md
39-39: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
CLAUDE.md
491-491: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
🔇 Additional comments (4)
CLAUDE.md (4)
378-402: Well-documented SVG implementation guidance aligned with PR objectives.The Icon and Asset Management Guidelines section provides clear, actionable guidance for SVG icon implementation. The Contents.json structure correctly specifies
"preserves-vector-representation": trueand"template-rendering-intent": "template"properties, which aligns with the learning about using.withRenderingMode(.alwaysTemplate)for SVG icons. The four shortcut states documented here match the PR's implementation scope perfectly.
503-539: Comprehensive version management guidance supports PR's 8.4.3 bump.The Info.plist version management section provides clear instructions for updating
MARKETING_VERSIONacross all targets. The verification commands usinggreppatterns are practical and help prevent incomplete version bumps. This documentation is particularly valuable given the PR's version bump to 8.4.3 and the need to update multiple targets consistently.
1178-1427: Comprehensive CTX/DashSpend API integration guidance addresses real implementation patterns.The new CTX/DashSpend API Integration section is thorough and well-documented with environment-specific differences (base URLs, field names, authentication requirements, response structures). The section correctly documents that staging uses HTTPS (not HTTP), provides fallback patterns for field name variations (
savingsPercentagevsuserDiscount), and explains the multi-provider database architecture. The common issues section with solutions is particularly valuable for practitioners. Testing guidelines are comprehensive with clear scenarios.
564-584: Dynamic network switching pattern correctly documented.The Network Switching section correctly emphasizes that external API endpoints must be computed dynamically rather than cached. The implementation pattern clearly shows the difference between ❌ WRONG (caching at initialization) and ✅ CORRECT (computing on each access), which is essential for testnet/mainnet switching without app restart.
- Unchecked the "Run Script - clang-format" build phase in Xcode - Prevents clang-format from running during builds - Stops the recurring issue with DWUpholdMainnetConstants.m being modified This change was made through Xcode's UI to disable the formatting script.
- Also unchecked "Run Script - clang-format" for the dashpay target - Both dashwallet and dashpay targets now have clang-format disabled - Ensures the script doesn't run regardless of which scheme is built This fully prevents DWUpholdMainnetConstants.m from being modified during builds.
Summary
This PR implements the new shortcut bar design from Figma with a new "Spend" button that navigates to the "Where to Spend" feature.
Changes
Icon Updates
Testing
All 4 shortcut bar states have been implemented and are ready for testing:
Screenshots
The shortcut bar will display different button combinations based on the wallet state as designed in Figma.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements
Documentation
Localization
Chores