Remove expo-av and the unused features that depended on it#5907
Open
janicduplessis wants to merge 8 commits into
Open
Remove expo-av and the unused features that depended on it#5907janicduplessis wants to merge 8 commits into
janicduplessis wants to merge 8 commits into
Conversation
expo-av is deprecated and removed in newer Expo SDKs. The rest of the app already uses expo-audio (AudioRecorder, nowPlaying); this migrates the two remaining expo-av consumers and drops the dependency. - AudioPlayer: rebuilt on the useAudioPlayer/useAudioPlayerStatus hooks and the new setAudioModeAsync signature. - MicInput: rebuilt on useAudioRecorder/useAudioRecorderState, RecordingPresets, and AudioModule permission APIs. - Remove expo-av from apps/tlon-mobile and packages/ui package.json, pnpm-lock.yaml, and apps/tlon-mobile/ios/Podfile.lock.
554e453 to
075228f
Compare
EmbedContent lost its last production consumer when links switched to preview cards (af5e9b9); with AudioPost gone, the AudioEmbed/AudioPlayer chain it carried is unreachable outside Cosmos fixtures. VideoEmbed stays as it renders video blocks.
The Configure view action was already non-functional: ChatOptionsSheet never forwarded onPressConfigureChannel past the top-level component. With the experimental custom-channel feature unused, remove the flag, the configuration bar, and the ref plumbing that existed only to open it.
The component renders an uploaded video attachment (poster, play badge, duration) and opens the media viewer; it is not an external-content embed, and it was the last file left in the Embed directory.
9356bd5 to
184969a
Compare
With the channel configuration UI gone, nothing can assign these ids to a channel anymore: collection renderers carousel/cards/sign/boardroom/ strobe/summaries, content renderers color/raw/yell/scratchpad, and draft inputs yo/color. The summaries view was also the only navigator to PostUsingContentConfigurationScreen, so that screen and its DetailPostUsingContentConfiguration renderer go too. Channels that still carry these ids fall back to the channel-type defaults.
6 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated expo-av dependency by deleting the last remaining (unused/unreachable) app features that depended on it: experimental custom-channel configuration/renderers/inputs and an orphaned embed-rendering system. It also renames the uploaded-video attachment component from VideoEmbed to VideoPreview and updates call sites accordingly.
Changes:
- Removed unused custom-channel configuration UI/flag and pruned unreachable renderer/input registry entries and implementations.
- Removed the orphaned embed-rendering system (including
useEmbed, embed UI components, and Cosmos fixtures that referenced it). - Dropped
expo-avfrom dependency manifests/lockfiles and updated video attachment rendering toVideoPreview.
Reviewed changes
Copilot reviewed 52 out of 54 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Removes expo-av from the workspace lock and prunes its resolved package entries. |
| packages/ui/package.json | Drops expo-av from peerDependencies. |
| packages/shared/src/logic/embed.ts | Removes useEmbed hook; retains fetchEmbed + trusted-provider logic for oEmbed enrichment paths. |
| packages/app/ui/index.tsx | Removes exports tied to deleted custom-channel/embed features; exports VideoPreview. |
| packages/app/ui/contexts/componentsKits/ComponentsKitProvider.tsx | Removes registrations for deleted content renderers, draft inputs, and collection renderers. |
| packages/app/ui/contexts/chatOptions/chatOptions.tsx | Removes the dead onPressConfigureChannel plumbing from provider → sheet wiring. |
| packages/app/ui/components/YellPost.tsx | Deletes the unused YellPost renderer. |
| packages/app/ui/components/VideoPreview.tsx | Introduces/relocates VideoPreview (renamed from VideoEmbed) for uploaded video attachments. |
| packages/app/ui/components/PostContent/BlockRenderer.tsx | Switches video block rendering from VideoEmbed to VideoPreview and updates related comments/types. |
| packages/app/ui/components/postCollectionViews/useLoadPostsInWindow.ts | Deletes helper hook used only by removed collection views. |
| packages/app/ui/components/postCollectionViews/SummaryCollectionView.tsx | Deletes the summaries collection view (unreachable after custom-channel removal). |
| packages/app/ui/components/postCollectionViews/StrobePostCollectionView.tsx | Deletes the strobe collection view implementation. |
| packages/app/ui/components/postCollectionViews/CarouselPostCollectionView.tsx | Deletes the carousel collection view implementation. |
| packages/app/ui/components/postCollectionViews/CardsPostCollectionView.tsx | Deletes the cards/sign collection view implementations. |
| packages/app/ui/components/postCollectionViews/BoardroomPostCollectionView.tsx | Deletes the boardroom collection view implementation. |
| packages/app/ui/components/ManageChannels/CreateChannelSheet.tsx | Removes custom-channel configuration bar/UI and related helper logic. |
| packages/app/ui/components/Embed/providers.ts | Deletes provider HTML generators for the removed embed system. |
| packages/app/ui/components/Embed/index.tsx | Deletes the embed barrel exports. |
| packages/app/ui/components/Embed/EmbedWebView.web.tsx | Deletes web embed renderer. |
| packages/app/ui/components/Embed/EmbedWebView.tsx | Deletes native embed renderer. |
| packages/app/ui/components/Embed/EmbedContent.tsx | Deletes embed content renderer (previously only reachable via fixtures). |
| packages/app/ui/components/Embed/Embed.tsx | Deletes embed UI frame component. |
| packages/app/ui/components/Embed/AudioPlayer.web.tsx | Deletes web audio player for embeds. |
| packages/app/ui/components/Embed/AudioPlayer.tsx | Deletes native expo-av-based audio player. |
| packages/app/ui/components/Embed/AudioEmbedShared.ts | Deletes shared types for audio embed/player components. |
| packages/app/ui/components/Embed/AudioEmbed.tsx | Deletes audio embed wrapper component. |
| packages/app/ui/components/EditableNotePostContent.tsx | Deletes scratchpad/note editing renderer tied to removed registry entries. |
| packages/app/ui/components/draftInputs/MicInput.tsx | Deletes expo-av-based mic draft input. |
| packages/app/ui/components/draftInputs/index.ts | Removes exports for deleted draft inputs. |
| packages/app/ui/components/draftInputs/ColorInput.tsx | Deletes color draft input. |
| packages/app/ui/components/draftInputs/ButtonInput.tsx | Deletes “yo button” draft input implementation. |
| packages/app/ui/components/DetailPostUsingContentConfiguration/index.ts | Deletes orphan detail-post export for custom-channel content configuration flow. |
| packages/app/ui/components/DetailPostUsingContentConfiguration/DetailPostUsingContentConfiguration.tsx | Deletes the detail-post screen component used only by removed summaries navigator path. |
| packages/app/ui/components/DetailPostUsingContentConfiguration/contextmenu.tsx | Deletes context-menu helper used only by removed detail-post flow. |
| packages/app/ui/components/ColorPost.tsx | Deletes color post renderer. |
| packages/app/ui/components/ChatOptionsSheet.tsx | Removes dead “Configure view” option and custom-channel flag subscription logic. |
| packages/app/ui/components/Channel/index.tsx | Removes ref-based configuration-bar opening and associated UI; simplifies Channel component API accordingly. |
| packages/app/ui/components/AudioPost.tsx | Deletes the audio post renderer that depended on removed audio player/embed code. |
| packages/app/navigation/types.ts | Removes PostUsingContentConfiguration route type. |
| packages/app/navigation/RootStack.tsx | Removes the PostUsingContentConfiguration screen from navigation. |
| packages/app/lib/featureFlags.ts | Removes customChannelCreation from feature metadata. |
| packages/app/fixtures/VideoPreview.fixture.tsx | Updates Cosmos fixture to use VideoPreview naming/export. |
| packages/app/fixtures/SummaryCollectionView.fixture.tsx | Deletes fixture for removed summary collection view. |
| packages/app/fixtures/EmbedContent.fixture.tsx | Deletes fixture for removed embed system. |
| packages/app/fixtures/ChannelConfigurationBar.fixture.tsx | Deletes fixture for removed configuration bar. |
| packages/app/fixtures/Channel.fixture.tsx | Removes custom-channel configurator fixture wiring. |
| packages/app/fixtures/AudioEmbed.fixture.tsx | Deletes fixture for removed audio embed. |
| packages/app/features/top/PostUsingContentConfigurationScreen.tsx | Deletes screen used only by removed summaries/navigation path. |
| packages/app/features/top/ChannelScreen.tsx | Removes Channel ref usage and configure-channel handler wiring. |
| packages/api/src/client/channelContentConfig.ts | Removes orphaned custom-channel registry specs for deleted renderers/inputs/content types. |
| apps/tlon-mobile/package.json | Removes expo-av dependency from the mobile app. |
| apps/tlon-mobile/ios/Podfile.lock | Removes EXAV pod entries tied to expo-av. |
| apps/tlon-mobile/cosmos.imports.ts | Removes Cosmos fixture imports for deleted embed/config/summary fixtures; renames video fixture import. |
| apps/tlon-mobile/android/app/gradle.lockfile | Removes expo-av/ExoPlayer-related locked artifacts and updates remaining locked coordinates. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
expo-avis deprecated and is removed in upcoming Expo SDKs. Auditing its last consumers showed they were all part of unused or unreachable features — the experimental custom-channel mic/audio post type and an orphaned embed-rendering system — so instead of migrating them toexpo-audio, this PR removes them and drops the dependency. Voice memos, the one production audio feature, were already onexpo-audioand are untouched.Extracted from #5886 so the dep removal can land independently of the SDK 56 upgrade.
Changes
micdraft input /audiopost type (confirmed unused by the team):MicInput,AudioPost, their registrations inComponentsKitProvider, and thetlon.r0.input.mic/tlon.r0.content.audioregistry entries. Channels that still carry that config degrade gracefully — unknown renderer ids fall back to the channel-type default (PostView), unknown input ids render no composer (DraftInputView). These are channel-level config ids, not message types: posts created throughMicInputare plain chat posts with an audio-file attachment, so no message on the network references anything removed here.customChannelCreationfeature flag and the channel-configuration UI it gated: the "Configure view" sheet action,ChannelConfigurationBar/ConfigInputinCreateChannelSheet, and theChannelref plumbing (forwardRef/useImperativeHandle) that existed only to open the bar. The action was already non-functional —ChatOptionsSheetnever forwardedonPressConfigureChannelpast its top-level component, so the button did nothing from anywhere. Flags persisted in local storage that are no longer infeatureMetaare tolerated on load.EmbedContentwhen they switched to preview cards (af5e9b9, ~5 months ago), leavingEmbedContent,AudioEmbed,AudioPlayer(+.web),Embed,EmbedWebView(+.web), the YouTube/Spotify/Twitter/TikTokprovidersHTML generators, and theuseEmbedhook reachable only from Cosmos fixtures.fetchEmbed/isTrustedEmbedin@tloncorp/sharedstay — the link-preview metadata path (metagrabActions) still uses them for oEmbed enrichment.carousel/cards/sign/boardroom/strobe/summaries(all ofpostCollectionViews/except the standardListPostCollection), content rendererscolor/raw/yell/scratchpad, and draft inputsyo/color. Thesummariesview was also the only navigator toPostUsingContentConfigurationScreen, so that screen andDetailPostUsingContentConfigurationgo with it. Thenotesids stay — notes channels are a live feature with their own creation path (createNotesChannel). Legacy channels carrying removed ids degrade the same way as the mic/audio ones.VideoEmbed→VideoPreviewand flatten the now single-fileEmbed/directory. The component renders an uploaded video attachment (poster, play badge, duration) and opens the media viewer — it isn't an embed;BlockRenderer'sVideoBlockkeeps wrapping it.expo-avfromapps/tlon-mobileandpackages/uipackage.json plus the pnpm, CocoaPods, and gradle lockfiles (the Android lockfile loses ExoPlayer 2.18 and the guava transitives that onlyexpo-avwas pulling).How did I test?
api,app,shared,tlon-mobile, andtlon-web;packages/apitests pass (192/192) after the registry-entry removal andpackages/sharedlogic tests pass (108/108) after theuseEmbedremoval; eslint on touched files shows only pre-existing warnings.expo-avremoved on iOS (iPhone 17 Pro simulator / iOS 26.2 and physical iPhone 17 Pro / iOS 26.5) and Android (Medium_Phone_API_35 emulator, productionDebug). Voice memo record/playback verified unaffected.EmbedContentfive months ago, and "Configure view" was dead due to the unforwarded prop.Risks and impact
Worst case: a channel somewhere still has a removed content config (
mic/audioor one of the experimental renderers above) (required the Tlon-employee flag plus the broken Configure view, so realistically only internal test channels) — its old posts render via the default chat renderer as attachment blocks instead of an audio player, and it shows no composer until reconfigured. Voice memos, video blocks, and link previews are untouched.Rollback plan
Revert the PR
Screenshots / videos
N/A — no UI changes to reachable surfaces.