feat(forum): share button on forum posts (app + public web link)#146
Conversation
Reworks self-updating so the new build downloads and verifies in the background as soon as a check finds it, then surfaces a single "Update ready — tap to restart & install" banner. One tap applies the staged build (desktop quits and relaunches into the new version; Android hands the staged APK to the system installer), eliminating the previous multi-click "view → download → install" flow. - Add UpdatePhase.ready plus stagedArchivePath/preparedVersion to UpdateState (with updateReady/downloading getters). - Split installUpdate() into prepareUpdate() (background download+verify, staged at ready) and applyUpdate() (apply staged, or download-then-apply as a fallback), sharing a _downloadAndVerify() helper. check() now fires prepareUpdate() automatically; guards make it safe to call on every hourly check and re-stage when a newer release ships. - Banner stays hidden during background download and only appears once staged; platforms that can't self-install (web/iOS, or a failed background download) fall back to the old "tap to view" banner. - Updates page button shows "Restart & install" with a restart icon when staged and reuses the staged download. Web is unchanged (service-worker reload). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds a share affordance to the forum post header offering two links: - "Share with those who have the app" → daccord://navigate deep link - "Share with the internet" → the public /s/<slug>/<channel>/<post> URL served by accordserver's SEO layer Copies the chosen link to the clipboard with a confirmation snackbar. Builds on the inline forum-thread pane (thread_view/forum_view). Also bundles in-progress work on reorderable space tabs, voice view selectors, and the emoji picker. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…y; add tests - Add clearStagedArchive/clearPreparedVersion flags to UpdateState.copyWith so staged archive state can be reset after a successful Android install. Previously these fields could never be set back to null, causing a stale stagedArchivePath to persist after applyUpdate completed — meaning the next periodic check() would kick off a redundant re-download. - Clear both staged fields when applyUpdate transitions to idle. - Fix formatting artifact: ScaffoldMessenger.of(context,) across three lines in accord_home_tabs.dart (trailing comma from auto-format). - Add missing unit tests: - UpdateState.updateReady getter (true only when ready + path set) - UpdateState.downloading getter (downloading + verifying, not others) - UpdateState.installing (ready excluded — that's what enables one-click) - copyWith clearStagedArchive / clearPreparedVersion flags - UpdateBanner: "restart & install" text when updateReady - UpdateBanner: shows fallback "view" banner on failed background download https://claude.ai/code/session_013krsj92YmYwELfMzFGanzN
Code Review — findings and fixes (ranked by severity)Fixes were pushed in commit f33592c directly to this branch. 🔴 HIGH —
|
Summary
daccord://navigate/{spaceId}/{channelId}?msg={postId}(opens the post in a daccord client){baseUrl}/s/{slug}/{channel}/{postId}— the public, crawlable URL served by accordserver's new SEO layerNotes for reviewers
thread_view.dart,forum_view.dart), reorderable space tabs (accord_home_tabs.dart), and voice-view selector tweaks (voice_view.dart), plus a small emoji-picker change. The share button itself is the only change authored in this session.flutter analyzeonthread_view.dartreports no issues.Test plan
daccord://navigate/...?msg=...linkhttps://.../s/<slug>/<channel>/<post>linkflutter analyze --no-fatal-infosis clean🤖 Generated with Claude Code