Skip to content

frontend/android: prompt to save exported files rather than sharing.#3740

Merged
bznein merged 2 commits intoBitBoxSwiss:masterfrom
bznein:codex-test
Feb 11, 2026
Merged

frontend/android: prompt to save exported files rather than sharing.#3740
bznein merged 2 commits intoBitBoxSwiss:masterfrom
bznein:codex-test

Conversation

@bznein
Copy link
Copy Markdown
Collaborator

@bznein bznein commented Jan 5, 2026

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

@bznein bznein requested a review from Beerosagos January 5, 2026 10:18
@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented Jan 5, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@benma
Copy link
Copy Markdown
Contributor

benma commented Jan 7, 2026

Fyi the commit titles don't match the commit contents, the second one is just a changelog entry.

Would also be nice to add a commit message body explaining the reason for the change.

@bznein bznein force-pushed the codex-test branch 2 times, most recently from 23be2db to d29ff2d Compare January 7, 2026 14:32
@bznein
Copy link
Copy Markdown
Collaborator Author

bznein commented Jan 7, 2026

Fyi the commit titles don't match the commit contents, the second one is just a changelog entry.

Would also be nice to add a commit message body explaining the reason for the change.

Thanks, done!

Copy link
Copy Markdown
Collaborator

@Beerosagos Beerosagos left a comment

Choose a reason for hiding this comment

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

I didn't test the code yet, but I think it would make sense to move as much code as possible inside a helper class, since both MainActivity and GoViewModel are already quite cluttered.

Imo the code is a bit hard to follow (two interfaces, back and forth between Activity and ViewModel) and not really Java/Android idiomatic. I tried asking GPT and it suggested using onActivityResult to handle the file picking result. Did you try that?


@Override
public void systemOpen(String url) throws Exception {
if (isLocalFile(url) && saveFileLauncher != null) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is already a check for local files inside Util.systemOpen, I think you can move the code there

return true;
}

private void saveFileWithPicker(String path) throws Exception {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This would be easier to follow by refactoring a few variables, I think. e.g. uri -> outputPath or similar

private GoViewModel goViewModel;
private WebViewManager webViewManager;
private UsbDeviceManager usbDeviceManager;
private ActivityResultLauncher<Intent> saveFileLauncher;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe this can be just a variable instead of a class field?

@bznein bznein force-pushed the codex-test branch 2 times, most recently from ce457b8 to 1378d2e Compare February 10, 2026 10:04
@bznein bznein requested a review from Beerosagos February 10, 2026 11:38
Copy link
Copy Markdown
Collaborator

@Beerosagos Beerosagos left a comment

Choose a reason for hiding this comment

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

tACK.

Note: @bznein and I both contributed to one of the commits, and we both tested and reviewed the outcome

@bznein bznein merged commit 8bb892c into BitBoxSwiss:master Feb 11, 2026
16 checks passed
@bznein bznein deleted the codex-test branch February 11, 2026 09:04
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