Skip to content

feat: add "Import private key" sheet and colors - #748

Merged
HashEngineering merged 11 commits into
feat/tool-menuitems-and-componentsfrom
feat/redesign-tools-round-1
Feb 20, 2026
Merged

HashEngineering merged 11 commits into
feat/tool-menuitems-and-componentsfrom
feat/redesign-tools-round-1

Conversation

@ross-dash

@ross-dash ross-dash commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • New Features

    • New private key import modal with streamlined scan action.
  • Style

    • Expanded shared color palette (many gray/white/blue tones) for improved visual consistency.
    • Added and updated menu icons and asset catalog images.
  • Chores

    • Adjusted build/launch and deployment configuration.
    • Added automation script to prepare gRPC/protobuf resources.

@ross-dash ross-dash self-assigned this Feb 2, 2026
@coderabbitai

coderabbitai Bot commented Feb 2, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a SwiftUI private-key import sheet, expands and reorganizes color tokens and asset catalogs, tweaks build/scheme settings and Podfile target, and adds a script to prepare DAPI-GRPC proto caches and pod installer artifacts.

Changes

Cohort / File(s) Summary
Build & Project Config
DashWallet.xcodeproj/xcshareddata/xcschemes/dashwallet.xcscheme, Podfile
Scheme: buildImplicitDependencies toggled to NO and launch config changed to Debug. Podfile: TodayExtension deployment target bumped to iOS 14.0.
New UI - Import Private Key
DashWallet/Sources/UI/Menu/Tools/ImportWallet/ImportPrivateKeySheet.swift, DashWallet/Sources/UI/Menu/Tools/ToolsMenuScreen.swift
Adds ImportPrivateKeySheet SwiftUI view and integrates it into ToolsMenuScreen via a new state flag and sheet presentation (uses iOS 16+ detents when available).
Design System - Color API
DashWallet/Sources/UI/SwiftUI Components/Color+DWStyle.swift
Extends Color extension with many new tokens (navigationBarColor, buttonRed, systemRed, gray50–500, multiple gray/white alpha variants, transparent). Minor body cleanup for gray400.
Asset Catalog — Images
DashWallet/Resources/AppAssets.xcassets/Menu/icon-close-sheet*.imageset/Contents.json, DashWallet/Resources/AppAssets.xcassets/Menu/image.import.private.key.large.imageset/Contents.json
Adds close-sheet icons (white + default) and a large private-key import icon with 1x/2x/3x entries.
Asset Catalog — Shared Colors Added
Shared/Resources/SharedAssets.xcassets/Colors/.../*
Adds many new color sets (Blue, White, Gray, Black, System, TextColors, alpha variants), reorders/updates several Contents.json files, and adds top-level color group descriptors.
Asset Catalog — Shared Colors Removed/Modified
Shared/Resources/SharedAssets.xcassets/Colors/.../*
Removes several legacy color files (e.g., Gray300/Gray400/Gray50/Gray500, GreenColor, OrangeColor, SystemRedColor, SystemYellowColor), and updates some color component values (BackgroundColor, SecondaryBackgroundColor, Label).
Scripts / Build Automation
scripts/prepare-dapi-grpc.sh
New Bash script to initialize submodules, install pod installer, generate protobuf/gRPC Objective‑C sources, and patch DAPI-GRPC podspec prepare_command for caching workflows.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A gentle sheet pops up with a tap and a wink,
New colors scatter like carrots in sync.
Icons snug in place, scripts hum in the night,
Builds set to debug — everything feels right.
Hop, skip, import — the wallet's alight! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 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 changes: adding an ImportPrivateKeySheet component and expanding color assets throughout the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/redesign-tools-round-1

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
DashWallet/Sources/UI/Menu/Tools/ToolsMenuScreen.swift (1)

220-238: ⚠️ Potential issue | 🟡 Minor

Remove the unused delegateInternal property.

The delegateInternal property (line 24) and DelegateInternal class (lines 230-238) are initialized but never used. The showImportPrivateKey() method displays the SwiftUI ImportPrivateKeySheet directly without utilizing the delegate. The DWImportWalletInfoViewController.createController() extension (lines 220-227) remains in use by other parts of the codebase (e.g., HomeViewController+Shortcuts.swift), so it should not be removed.

🤖 Fix all issues with AI agents
In
`@DashWallet/Resources/AppAssets.xcassets/Menu/image.import.private.key.large.imageset/Contents.json`:
- Around line 1-17: The asset set "import.private.key.large" currently lists the
same bitmap file for scale "1x", "2x", and "3x"; replace these duplicates with
properly scaled raster variants (e.g., [email protected],
[email protected], [email protected]) or switch the
asset to a single vector/PDF to let Xcode generate correct scales; update the
Contents.json entries for the "images" array to reference the correct filenames
for each scale so the import.private.key.large image renders crisply on all
device scale factors.

In `@scripts/prepare-dapi-grpc.sh`:
- Around line 7-8: The RELEASE_CACHE and EXTERNAL_CACHE variables are hardcoded
to a specific user path which will break on other machines; update the script to
build these paths dynamically by using the $HOME environment variable (or
fallback to `~`) and any necessary relative subpaths so RELEASE_CACHE and
EXTERNAL_CACHE are portable across systems; locate the assignments to
RELEASE_CACHE and EXTERNAL_CACHE in scripts/prepare-dapi-grpc.sh and replace the
hardcoded "/Users/ross/..." prefixes with a dynamic base (e.g.,
"$HOME/Library/Caches/...") and ensure any path concatenation uses safe shell
handling to avoid breaking on spaces.

In
`@Shared/Resources/SharedAssets.xcassets/Colors/Gray/Gray200.colorset/Contents.json`:
- Around line 1-20: The Gray200 color entry is using identical RGB hex
components ("red":"0xF5","green":"0xF6","blue":"0xF7") to Gray50; confirm the
design spec for the intended Gray200 value and, if Gray200 should be darker,
update the "red"/"green"/"blue" component strings in the Gray200 colorset (the
Contents.json entry for Gray200) to the correct darker hex components (or adjust
"alpha" if translucency was intended), then validate visually in the asset
catalog and run any token-generation scripts to ensure Gray200 no longer
duplicates Gray50.

In
`@Shared/Resources/SharedAssets.xcassets/Colors/White/WhiteAlpha15.colorset/Contents.json`:
- Around line 6-11: The "components" block in Contents.json for the WhiteAlpha
color sets red to "0xFE" while green and blue are "0xFF", causing a slight tint;
update the "red" component value from "0xFE" to "0xFF" in the
WhiteAlpha15.colorset (modify the "components" -> "red" entry) so RGB reads
"red":"0xFF","green":"0xFF","blue":"0xFF" for true white, unless the off-by-one
was intentionally required by design.

In
`@Shared/Resources/SharedAssets.xcassets/Colors/White/WhiteAlpha70.colorset/Contents.json`:
- Around line 6-11: The components block in the Colorset Contents.json has "red"
: "0xFE" while "green" and "blue" are "0xFF", producing a non‑pure white; update
the "red" value to "0xFF" in the components object (and check other
WhiteAlpha*.colorset Contents.json files for the same copy/paste error) so all
RGB components match for pure white with the existing "alpha" value.
🧹 Nitpick comments (8)
DashWallet/Resources/AppAssets.xcassets/Menu/icon-close-sheet.imageset/Contents.json (1)

1-23: Prefer SVG imageset for AppAssets icons.

This imageset uses PNG variants; please consider switching to SVG with vector preservation + template rendering to match asset guidelines.

♻️ Proposed SVG imageset structure
 {
   "images" : [
     {
-      "filename" : "icon-close-sheet.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "filename" : "[email protected]",
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "filename" : "[email protected]",
-      "idiom" : "universal",
-      "scale" : "3x"
+      "filename" : "icon-close-sheet.svg",
+      "idiom" : "universal"
     }
   ],
   "info" : {
     "author" : "xcode",
     "version" : 1
-  }
+  },
+  "properties" : {
+    "preserves-vector-representation" : true,
+    "template-rendering-intent" : "template"
+  }
 }

Based on learnings: Applies to /AppAssets.xcassets//*.svg : Use SVG icons instead of PNG. Configure SVG imagesets with preserves-vector-representation: true and template-rendering-intent: template in Contents.json to enable scaling and color adaptation.

scripts/prepare-dapi-grpc.sh (2)

18-22: Excessive error suppression may hide legitimate failures.

Redirecting stderr and using || true on git operations masks real errors. If git submodule update fails for a reason other than "already initialized," you won't know.

♻️ Suggested improvement with conditional error handling
-            git init 2>/dev/null || true
-            git submodule update --init --recursive 2>/dev/null || true
+            if [ ! -d ".git" ]; then
+                git init
+            fi
+            git submodule update --init --recursive || echo "  Warning: submodule update failed"
             if [ -d "platform" ]; then
-                (cd platform && git reset --hard 2>/dev/null) || true
+                (cd platform && git reset --hard) || echo "  Warning: git reset failed"
             fi

65-68: Hardcoded version in generated podspec may drift from actual version.

The version 0.22.0-dev.8 is hardcoded in the heredoc. If the cached pod version changes, this will produce a mismatch.

♻️ Extract version dynamically
+        # Extract version from existing podspec before overwriting
+        DAPI_VERSION=$(grep -oP "s\.version\s*=\s*['\"]\\K[^'\"]+' DAPI-GRPC.podspec 2>/dev/null || echo "0.22.0-dev.8")
+        
         cat > DAPI-GRPC.podspec.new << PODSPEC_EOF
 Pod::Spec.new do |s|
   s.name     = "DAPI-GRPC"
-  s.version  = "0.22.0-dev.8"
+  s.version  = "${DAPI_VERSION}"

Note: You'd also need to remove the single quotes around PODSPEC_EOF to enable variable expansion.

DashWallet/Resources/AppAssets.xcassets/Menu/icon-close-sheet-white.imageset/Contents.json (1)

1-23: Consider using SVG instead of PNG for better scalability.

This icon uses multiple PNG files at different scales. SVG would provide better scaling and allow color adaptation via template rendering.

♻️ Suggested SVG configuration
{
  "images" : [
    {
      "filename" : "icon-close-sheet-white.svg",
      "idiom" : "universal"
    }
  ],
  "info" : {
    "author" : "xcode",
    "version" : 1
  },
  "properties" : {
    "preserves-vector-representation" : true,
    "template-rendering-intent" : "template"
  }
}

As per coding guidelines: "Use SVG icons instead of PNG. Configure SVG imagesets with preserves-vector-representation: true and template-rendering-intent: template in Contents.json to enable scaling and color adaptation."

Shared/Resources/SharedAssets.xcassets/Colors/White/WhiteAlpha50.colorset/Contents.json (1)

6-11: Minor: Red component is 0xFE instead of 0xFF.

The red component is 254 (0xFE) instead of 255 (0xFF) for pure white. This creates a barely perceptible tint. If intentional by design, this is fine; otherwise, consider using 0xFF for consistency.

DashWallet/Sources/UI/Menu/Tools/ImportWallet/ImportPrivateKeySheet.swift (1)

38-51: Optional: Address SwiftLint trailing closure warning.

SwiftLint flags trailing closure syntax when multiple closures are passed. This is a minor style nit that can be addressed by using explicit content: label.

Suggested fix
                 Button(action: {
                     presentationMode.wrappedValue.dismiss()
-                }) {
+                }, label: {
                     Image(colorScheme == .dark ? "icon-close-sheet-white" : "icon-close-sheet")
                         .resizable()
                         .aspectRatio(contentMode: .fit)
                         .frame(width: 9, height: 9)
                         .foregroundColor(Color.primaryText)
                         .frame(width: 34, height: 34)
                         .overlay(
                             Circle()
                                 .stroke(Color.gray300.opacity(0.3), lineWidth: 1.5)
                         )
-                }
+                })
DashWallet/Sources/UI/SwiftUI Components/Color+DWStyle.swift (1)

191-200: TODO: Dark mode shadow color needs proper value.

Line 195 has a TODO comment indicating the dark mode shadow color is a placeholder. Consider addressing this before release to ensure consistent dark mode appearance.

Would you like me to open an issue to track completing the dark mode shadow color implementation?

Shared/Resources/SharedAssets.xcassets/Colors/System/SystemRedColor.colorset/Contents.json (1)

2-14: Verify if dark mode variant is needed.

The color asset defines only a universal appearance without separate light/dark mode variants. For UI colors, especially in an iOS app with system-wide dark mode support, it's common to provide appearance-specific variants.

Please verify whether SystemRedColor should have the same appearance in both light and dark modes, or if a dark mode variant should be added.

Comment thread scripts/prepare-dapi-grpc.sh Resolved
optimisticcreator and others added 11 commits February 2, 2026 21:17
Replace full-page navigation with SwiftUI bottom sheet presentation for Import Private Key feature. Includes custom grabber, close button, and updated layout matching design specifications. Sheet height set to 460px with proper spacing and content positioning.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Remove AtmDetailsView.swift references from project file
- Set build configuration to Debug
- Disable implicit dependencies to avoid WatchApp build issues

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Created scripts/prepare-dapi-grpc.sh to pre-generate proto files
- Workaround for DAPI-GRPC submodule initialization issue in CocoaPods
- Script handles both Release and External cache locations
- Modifies podspec to skip failing prepare_command
- Updated Podfile.lock with all 49 successfully installed pods
- Requires CocoaPods 1.15.2

Usage: Run ./scripts/prepare-dapi-grpc.sh before pod install

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Replace --quiet with --silent flag (1.15.2 doesn't support --quiet)
- Fix cd platform command to prevent script errors
- Update Podfile.lock checksum from regeneration

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
…ary version

- Changed TodayExtension platform from iOS 13.0 to iOS 14.0
- Fixes library mismatch error (was looking for DSDynamicOptions-iOS13.0, now uses DSDynamicOptions)
- Consistent with post_install script that sets all iOS targets to 14.0

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Add PIGGYCARDS_ENABLED compiler flag to all build configurations (Debug, Testnet, Testflight, Release)
- Add GeoRestrictionService.swift to Xcode project with proper build file and group references
- Remove hardcoded DSDynamicOptions-iOS14.0 linker flags that prevented successful builds
- Add Gray1000 color asset to SharedAssets

These changes fix compilation errors introduced when master (with PiggyCards geo-restriction feature) was merged into this branch. The GeoRestrictionService file existed on disk but wasn't in the Xcode project, and the hardcoded linker flags conflicted with CocoaPods configuration.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1. Coderabbit changes to colors;
2. Import private key images;
@ross-dash
ross-dash force-pushed the feat/redesign-tools-round-1 branch from faeef74 to 10ffd5b Compare February 2, 2026 20:31
@HashEngineering
HashEngineering changed the base branch from master to feat/tool-menuitems-and-components February 20, 2026 21:59
@HashEngineering HashEngineering changed the title Feat: Add "Import private key" sheet and colors feat: add "Import private key" sheet and colors Feb 20, 2026

@HashEngineering HashEngineering 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.

we will fix any problems in the next PR

@HashEngineering
HashEngineering merged commit aa9603f into feat/tool-menuitems-and-components Feb 20, 2026
1 of 2 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