Skip to content

Stop writing to a share when its editor opens - #45

Merged
TeoVader merged 4 commits into
mainfrom
fix/share-editor-no-write-on-open
Nov 11, 2026
Merged

TeoVader merged 4 commits into
mainfrom
fix/share-editor-no-write-on-open

Conversation

@TeoVader

Copy link
Copy Markdown
Owner

What changes

Before:

  • Opening a share link's settings sent a PATCH (renaming the link to its own name) only to read the settings the plain GET left out. Just looking was a write, and it could undo a rename made elsewhere meanwhile.
  • Tapping ✕ next to a reviewer or a file in a link removed it at once, with no confirmation and no undo.
  • A share link of the user's own account (pasted, or tapped in another app) opened in the app as the plain file or folder, with no hint that the link's expiry, passphrase, download setting and watermark don't apply there.

After:

  • Opening the editor only reads. It uses Frame.io's experimental "Show share" (GET /v4/accounts/{a}/shares/{s} with api-version: experimental), which documents layout, theme, accent colour, versions, transcripts, captions, watermark and watermark_template_id. If that call fails it falls back to the stable GET. If the layout and viewer settings still don't come back, they show as unset (no layout or theme chip selected) under a short note, until the user changes one; that answer then fills them all in. A template id from the server now replaces the locally remembered one.
  • Removing a reviewer asks "Remove name?" / "They will no longer be able to open this link." Removing a file asks "Remove file?" / "Reviewers will no longer see it through this link. The file stays in the project."
  • When an own-account share link opens in the app, a small card at the bottom says "Opened with your access" and explains what doesn't apply. It offers "Open the share link in the browser" (FrameLinks.openInBrowserTab) and goes away after 12 s or on "Done". It shows on each such open, not once per install, so the way to the real link is always offered.

How

  • FrameioApi.shareExperimental, FrameioRepository.shareDetails() (experimental, then stable; complete says which one answered), Share.watermarkTemplateId.
  • ShareEditorSheet: no PATCH on open; settingsUnread flag; ConfirmRemoveDialog.
  • LinkTarget.FromShare(shareUrl, target) wraps what a share link resolves to; AppNav shows ShareAccessNotice and then opens the target as before.
  • New strings in all six locales; screenshot share_access_notice. Its baseline comes from the CI test-report artifact (Linux).

Not verified against a live account (no real Frame.io calls during development): that the experimental GET returns these fields in practice, as documented.

Checks

  • ./gradlew :app:verifyRoborazziDebug :app:lintDebug passes (lint at 0)
  • New or changed UI has a Roborazzi screenshot
  • Tried on a phone (if it touches playback, uploads or permissions): not tried. Worth opening a link's settings on the test project and checking that layout, theme and toggles match the web app.

🤖 Generated with Claude Code

TeoVader and others added 4 commits November 11, 2026 16:58
Opening the share editor ran a GET and then a PATCH of the name to get
the settings the stable GET omits: a write just for looking, which could
undo a rename made meanwhile. It now reads them with the experimental
Show share (documented with layout, theme, versions, captions, watermark
and template) and falls back to the stable GET; settings still missing
show as unset, with a note, until the user changes one.

Removing a reviewer or a file from a link asks first. A share link of
the user's own account that opens in the app as the plain file or
folder shows a short notice that the link's expiry, passphrase,
download setting and watermark don't apply, with a button to open the
link in the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	app/src/test/java/dev/finalish/ui/screenshots/ComponentsScreenshotTest.kt
@TeoVader
TeoVader merged commit cdf4d30 into main Nov 11, 2026
2 checks passed
@TeoVader
TeoVader deleted the fix/share-editor-no-write-on-open branch November 11, 2026 17:20
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