Skip to content

feat(android): add contextual SAF document and folder pickers - #3009

Open
marvin1099 wants to merge 8 commits into
Acode-Foundation:mainfrom
marvin1099:feat/android-saf-storage
Open

marvin1099 wants to merge 8 commits into
Acode-Foundation:mainfrom
marvin1099:feat/android-saf-storage

Conversation

@marvin1099

@marvin1099 marvin1099 commented Oct 31, 2026 •

Copy link
Copy Markdown

Summary

Save / Save As
  Create document on device -> ACTION_CREATE_DOCUMENT -> write editor buffer

Open File
  Select document -> ACTION_OPEN_DOCUMENT -> open selected URI

Save File destination / Open Folder
  Choose folder on device -> ACTION_OPEN_DOCUMENT_TREE -> retain folder grant
  • Keep Create document on device in the Save dialog and add it to the save-context File Browser.
  • Expose Choose folder on device only in Save File and Open Folder contexts; picker rows support keyboard activation.
  • Preserve the existing tab URI and persistence state until a Create Document Save As write succeeds; update the filename before re-locking single-document mode.
  • Keep the changes in eight focused commits; no version bumps.

Evidence

  • Before: Save offered only folder selection; the native picker rows were not available in the intended File Browser contexts.
  • After: Real File Browser interaction tests click the picker rows, verify availability in Save File / Open Folder / Open File, and activate Select document with Enter and Space. Failed saves preserve the existing recovery identity; a real EditorFile test verifies renaming and language switching for a new document.
  • Automated: 96 test files / 874 tests pass; typecheck, Biome, and Rspack pass. F-Droid remains unchanged.

Merge Danger

Door: Two-way; the commits can be reverted independently.

Blast Radius: Medium — Android document save/open and folder-selection flows.

AI was used to make these changes. Feel free to ignore, cherry-pick, or request changes I should make for this PR to be a good fit.

@github-actions github-actions Bot added enhancement New feature or request translations Anything related to Translations Whether a Issue or PR labels Oct 31, 2026
@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds Android document creation and context-specific folder picking.

  • Save flows can create a new document through Android’s system picker.
  • The File Browser shows native picker actions that fit its current task.

No new actionable issues were found. The earlier keyboard finding is fixed. The supplied fixes for failed-save recovery, browser interaction coverage, and saved tab names are also present.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Save or Save As] --> B{Choose destination}
  B --> C[Choose folder]
  B --> D[Create Android document]
  C --> E[Write editor text]
  D --> F[Write editor text to returned URI]
  F --> G{Write succeeded?}
  G -->|No| H[Keep existing tab identity]
  G -->|Yes| I[Update name, URI, and persistence]
  I --> J[Mark saved]
  E --> J
Loading

Reviews (4) · Last reviewed commit: "feat(file-browser): enable device folder..." · Reviewed by Greptile

Comment thread src/lib/saveFile.js Resolved
@marvin1099
marvin1099 force-pushed the feat/android-saf-storage branch 2 times, most recently from 71fb3e4 to 60227cc Compare October 31, 2026 09:29
Comment thread src/lib/saveFile.js Resolved
@marvin1099
marvin1099 force-pushed the feat/android-saf-storage branch from 60227cc to d6c3746 Compare October 31, 2026 11:07
Comment thread src/pages/fileBrowser/fileBrowser.js Resolved
@marvin1099
marvin1099 force-pushed the feat/android-saf-storage branch from d6c3746 to 1d4df2b Compare November 1, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request translations Anything related to Translations Whether a Issue or PR

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant