Skip to content

feat(desktop-app): tauri setup#1160

Open
dr-leevsey wants to merge 126 commits intomasterfrom
feat/tauri-app
Open

feat(desktop-app): tauri setup#1160
dr-leevsey wants to merge 126 commits intomasterfrom
feat/tauri-app

Conversation

@dr-leevsey
Copy link
Contributor

yarn tauri dev to start development mode
yarn tauri build produces APP bundle and DMG under src-tauri/target/release folder

@netlify
Copy link

netlify bot commented May 13, 2024

Deploy Preview for cyb-xp ready!

Name Link
🔨 Latest commit 6d15c8c
🔍 Latest deploy log https://app.netlify.com/sites/cyb-xp/deploys/676e80f80815e20008d41e04
😎 Deploy Preview https://deploy-preview-1160--cyb-xp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented May 13, 2024

Deploy Preview for rebyc failed. Why did it fail? →

Name Link
🔨 Latest commit 6d15c8c
🔍 Latest deploy log https://app.netlify.com/sites/rebyc/deploys/676e80f82f064f00084c7856

@happylolonly happylolonly added feature Atomic function which can be described epic Set of features which add significant value labels Jun 30, 2024
@happylolonly happylolonly marked this pull request as draft July 10, 2024 05:25
saint-Joy and others added 30 commits February 27, 2026 04:13
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate from inline UniversalHash hashing to uhash-prover's Solver trait
with multi-backend support (CPU, Metal, CUDA, WGPU). find_proof_batch now
returns actual hash count instead of full batch size, fixing ~75x inflated
hashrate display. Switch from local path deps to crates.io 0.4.3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dynamic alpha now uses per-million resolution (was per-mille) for
finer staking reward granularity. Add bostrom-mcp project config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ring mining

The react-force-graph-3d library's D3-timer module creates setInterval(poke, 1000)
on every animation frame. WebKit accumulates these instead of replacing them,
causing 85% CPU usage on every page (graph is in the global footer).

Fix: intercept setInterval in CyberlinksGraph, track all IDs created by the
ForceGraph3D internals, and aggressively sweep them every 100ms. This keeps
the built-in animation loop running (correct visuals) while preventing the
timer cascade.

Also: unmount the 3D graph entirely during active mining via Redux state
(mining.active), dropping WebKit from 85% to 6-9% during mining.

Other changes in this commit:
- Tauri: RunEvent::Exit handler for IPFS/mining cleanup
- Mining: stabilize polling with processQueueRef pattern
- Mining: replace react-query refetchInterval with manual 30s timer
- Mining: add emission simulator, staking/referral sections
- Mining hooks: fetchRef pattern to avoid interval churn

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…endering bug

The global CSS rules `input:focus::-webkit-input-placeholder { opacity: 0 }`
triggered a WebKit compositing bug in Tauri where the entire input element
stopped painting when focused and empty. Also changed global placeholder
color from teal (#3ab793) to gray (#777). Added focus box-shadow and
min-height to mining staking inputs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Mining process persists across page navigation (Tauri backend keeps
  running, WASM miner moved to module scope)
- New useMiningMonitor hook in App.tsx polls backend every 1s, stores
  full MiningStatus in Redux as single source of truth
- MiningBadge in header always shows correct hashrate via Redux
- Mining page reads status from Redux instead of local state
- Click-through guard prevents stale ActionBar clicks from stopping mining
- Replace SimulatorSection with live ConfigPanel (admin config management)
- Add StakingSection with CW20 balance, APR formatting (T/B/M/K tiers)
- Add ReferralSection, ConfigPanel, WebSocket block subscription
- Generated lithium contract TypeScript clients
- Tauri: GPU backend selection, metrics tracking, proof relay support
- Fix splashscreen overlap (both windows start hidden)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bufferTime(0) in RxBroadcastChannelListener caused RxJS AsyncScheduler
to create/clear ~144K setInterval(fn, 0) calls per second, consuming
85% CPU in WebKit. Changed to bufferTime(200) for reasonable batching.

Also removed the useIntervalSweep hack from CyberlinksGraph that was
a workaround for this bug (incorrectly attributed to d3-timer).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Regenerate all platform icons (macOS, iOS, Android, Windows)
- Swap portal menu: small icon uses glow SVG, large uses original
- Update favicon
- Menu component styling improvements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t Logs button

Relay was broken: contract requires sender==miner but relay signed as
activator. Changed to account activation flow — relay sends 1boot to
create new accounts, then cyb-ts retries proof submission directly.

Added Export Logs button on Mining page for testers to copy full session
diagnostics (config, hashrate, proof log, network stats) to clipboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- cyb-boot Rust binary: decrypts boot.dat, writes bootstrap.json, downloads .pkg
- Distribution server integration: web encrypts wallet, server returns zip with signed binary + boot.dat
- DownloadSection component: platform detection, AES-256-GCM encryption, download trigger
- Tauri bootstrap import: read_bootstrap command imports wallet on first launch
- macOS release CI: GitHub Actions workflow with code signing + notarization
- Artifacts: .dmg, .pkg, cyb-boot published to GitHub Releases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add tauri-plugin-deep-link for iOS/Android Universal Links (cyb.ai URLs
  open in app, preserving ?ref= referrer)
- Handle deep link URLs at app init via getCurrent() + onOpenUrl()
- Fix cyb-boot PKG download URL to use cyberia-to/cyb repo
- Enrich mining log export with device info, Tauri backend metrics,
  uhash params, block context, proof summary stats
- Switch log export from clipboard to file download

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace SCP deploy to Jupiter with HMAC-authenticated webhook trigger
- Server now runs locally on Cyberproxy (no Jupiter proxy hop)
- Rename Install-cyb.zip → boot-cyb.zip, Install cyb.app → boot cyb.app
- API path: POST /api/boot (was /api/boot/boot)
- Server handler: / (was /boot)
- Add boot server Go source and docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t.dat discovery

- Rename boot-cyb.zip → boot_cyb.zip and boot cyb.app → Boot Cyb.app everywhere
- Add ~/Desktop as boot.dat search path
- Scan immediate subdirectories of ~/Downloads and ~/Desktop for boot.dat

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Check bootstrap.json before localStorage so that wallet imported
via cyb-boot takes priority over any previously generated wallet.
The file is deleted after reading, so this only applies once.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Headline: "Mine 10x faster in app"
- Desktop: platform-detected download button
- Mobile: "coming soon" button for iOS/Android

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tauri-plugin-dialog and tauri-plugin-fs for native file operations.
Export logs now opens a Save dialog on desktop instead of copying to clipboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hashrate was jumping wildly due to bursty counter + double smoothing:
- Backend 5s rolling window was shorter than batch time (~7s)
- Frontend EMA re-derived rate from total_hashes delta, seeing mostly
  zeros between batches then a spike when a batch completed

Fixes:
- Backend: increase rolling window from 5s to 30s (fits multiple batches)
- Backend: record snapshots on proof-found path (was missing)
- Frontend: remove EMA re-derivation, use backend's rolling hashrate directly
- Add session average display below main hashrate as stable anchor
- Downsample sparkline to 5s intervals instead of every render

Also adds:
- Proof retry queue with exponential backoff for transport errors
- RPC connection health tracking with offline indicator
- Sleep/wake and network reconnection recovery
- Native save dialog capability for log export

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…port

Replace timer polling (10s/120s) with event-driven refresh:
- New block (WS) triggers refetchAll for all display data
- resyncAfterProof fetches config + balance after proof submit
- 30s fallback interval only when WebSocket is disconnected
- Wake/resume/online handlers use refetchAll + refetchConfig

Local sequence tracking eliminates account sequence mismatch errors:
- Track accountNumber + sequence in seqRef, increment on success
- Use sign() + broadcastTx() instead of execute() to pass explicit SignerData
- On sequence mismatch: re-fetch from chain and retry once
- Reset sequence on unknown errors or account activation

Fix cooldown bypass after failed submissions:
- Set lastSubmitTimeRef before await (was only set on success)
- Prevents rapid-fire cascade of failures at 1s intervals

Other:
- Export logs filtered to current app session only
- Tx details page polls until confirmed
- Embed challenge in Rust FoundProof for stale-proof tracking
- Refresh badge shows 'reconnecting...' instead of countdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic Set of features which add significant value feature Atomic function which can be described

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants