Skip to content

fix: repair settings icon and Android download staging - #12

Merged
Aswanidev-vs merged 1 commit into
mainfrom
develop
Aug 8, 2026
Merged

fix: repair settings icon and Android download staging#12
Aswanidev-vs merged 1 commit into
mainfrom
develop

Conversation

@Aswanidev-vs

@Aswanidev-vs Aswanidev-vs commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Improved file transfers by reporting directory creation and upload failures instead of silently continuing.
    • Prevented mobile file staging from incorrectly falling back to the current working directory.
    • Improved Android internal storage detection.
  • Style

    • Updated the settings icon with a refreshed gear design.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f2d3b0cd-5a9f-4c1c-a147-73f6a67e8550

📥 Commits

Reviewing files that changed from the base of the PR and between b4f0f02 and b71c725.

📒 Files selected for processing (3)
  • frontend/src/components/common/Icon.vue
  • internal/light/filetransfer.go
  • internal/light/settings.go

📝 Walkthrough

Walkthrough

The change improves receiver directory error propagation, adds an Android package path for storage discovery, normalizes settings formatting, and replaces the settings icon SVG path.

Changes

File Transfer Error Handling

Layer / File(s) Summary
Receiver directory error propagation
internal/light/filetransfer.go
receiveDir now returns directory creation errors. Mobile staging no longer falls back to the current working directory. Transfer handling reports returned errors. Receiver HTTP errors use errors.New.

Android Storage Discovery

Layer / File(s) Summary
Android package path discovery
internal/light/settings.go
Android storage discovery now checks the com.light.fileshare package path. Settings setter formatting changed without behavior changes.

Settings Icon Update

Layer / File(s) Summary
Settings SVG path
frontend/src/components/common/Icon.vue
The settings icon uses a replacement gear-shaped SVG path.

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

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

@Aswanidev-vs
Aswanidev-vs merged commit 4ba4a76 into main Aug 8, 2026
14 of 16 checks passed
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix settings icon and Android download staging directory selection

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Fix the settings gear SVG path so the icon renders consistently.
• Ensure mobile/Android downloads stage into a verified writable directory (or fail clearly).
• Improve Android internal config directory discovery for the new package name.
Diagram

graph TD
  peer{{"Peer device"}} --> fts["FileTransferService HTTP"] --> decision{"Mobile?"}
  peer{{"Peer device"}} --> fts["FileTransferService HTTP"] --> decision{"Mobile?"} -->|"Yes"| staging[("Staging dir")]
  peer{{"Peer device"}} --> fts["FileTransferService HTTP"] --> decision{"Mobile?"} -->|"No"| download[("DownloadDir")]
  fts["FileTransferService HTTP"] --> settings["SettingsService"] --> download[("DownloadDir")]
  ui["Settings screen"] --> icon[["Icon.vue (settings)"]]
  subgraph Legend
    direction LR
    _ext{{"External"}} ~~~ _svc["Service"] ~~~ _dec{"Decision"} ~~~ _stor[("Storage")] ~~~ _file[["File"]]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Always stage to app-internal dir (all platforms)
  • ➕ Uniform behavior across platforms; fewer conditional paths
  • ➕ Avoids failures when user-configured DownloadDir is unwritable
  • ➖ Breaks expected desktop behavior where users want direct downloads to their chosen folder
  • ➖ Adds a required post-move step even when not needed
2. Write directly to Android SAF destination via native bridge
  • ➕ Eliminates staging and the extra copy step on Android
  • ➕ Aligns with scoped-storage best practices
  • ➖ Higher implementation complexity (platform-specific code, permissions, SAF APIs)
  • ➖ Harder to test; increases maintenance burden
3. Add a third fallback staging location (e.g., OS cache/app cache)
  • ➕ More resilient on unusual Android environments where configDir/temp are not writable
  • ➖ More paths to reason about; may obscure underlying permission/config issues

Recommendation: The PR’s approach (verify staging directories and return an explicit error when none are writable) is the best near-term fix: it prevents silent fallbacks to non-writable locations and makes failures actionable. If Android write failures persist in the field, consider adding a dedicated app-cache fallback or moving to a SAF-native write path later.

Files changed (3) +45 / -39

Bug fix (3) +45 / -39
Icon.vueReplace settings icon SVG path for correct rendering +1/-1

Replace settings icon SVG path for correct rendering

• Updates the SVG path used for the 'settings' icon while keeping the same circle center element. This fixes visual issues with the gear icon rendering.

frontend/src/components/common/Icon.vue

filetransfer.goHarden receive directory selection and error handling for mobile staging +35/-31

Harden receive directory selection and error handling for mobile staging

• Changes receiveDir to return (dir, error) and ensures the receiver creates/validates a writable staging directory on mobile instead of falling back to potentially unwritable paths. Also switches receiver-error returns in uploads to use errors.New for clarity.

internal/light/filetransfer.go

settings.goRecognize new Android package name for internal storage configDir +9/-7

Recognize new Android package name for internal storage configDir

• Adds the production Android package name to the list of candidates for locating app-internal storage. Minor formatting changes to setter methods improve readability without changing behavior.

internal/light/settings.go

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

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