Skip to content

shared cleanup#29245

Merged
chrisnojima merged 2 commits into
nojima/HOTPOT-next-670-clean-2from
nojima/HOTPOT-shared-cleanup
May 26, 2026
Merged

shared cleanup#29245
chrisnojima merged 2 commits into
nojima/HOTPOT-next-670-clean-2from
nojima/HOTPOT-shared-cleanup

Conversation

@chrisnojima
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR performs a broad “shared cleanup” across the shared/ TypeScript/React code by removing many *.shared.tsx type-only modules/stubs and inlining the corresponding types (and a few small shared helpers) into the implementation files. It also consolidates some shared router/theme and style utilities directly into their primary modules, and removes an old TypeScript-splitting plan document.

Changes:

  • Inlined many Props/type exports into their consuming .tsx files and deleted the corresponding *.shared.tsx files.
  • Moved router-v2 shared theme/loading helpers into router.tsx and consolidated style utilities directly into shared/styles/index.tsx.
  • Removed plans/split-ts.md.

Reviewed changes

Copilot reviewed 113 out of 113 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
shared/util/use-intersection-observer.tsx Inlines IntersectionObserver-related types that were previously in a separate shared type file.
shared/util/use-intersection-observer.shared.tsx Deleted (types moved into use-intersection-observer.tsx).
shared/util/feature-flags.tsx Inlines FeatureFlags type previously sourced from a shared type file.
shared/util/feature-flags.shared.tsx Deleted (types moved into feature-flags.tsx).
shared/team-building/service-tab-bar.tsx Inlines Props/IconProps types previously sourced from a shared type file.
shared/team-building/service-tab-bar.shared.tsx Deleted (types moved into service-tab-bar.tsx).
shared/team-building/alphabet-index.tsx Inlines Props type previously sourced from a shared type file.
shared/team-building/alphabet-index.shared.tsx Deleted (types moved into alphabet-index.tsx).
shared/styles/index.tsx Consolidates shared style constants/helpers into the main styles entrypoint and adjusts exports.
shared/stores/settings-contacts.tsx Inlines store State/Store types previously sourced from a shared type file.
shared/stores/settings-contacts.shared.tsx Deleted (types moved into settings-contacts.tsx).
shared/stores/push.tsx Inlines store State/Store types previously sourced from a shared type file.
shared/stores/push.shared.tsx Deleted (types moved into push.tsx).
shared/router-v2/router.tsx Inlines shared loading/theme helpers directly into router implementation.
shared/router-v2/router.shared.tsx Deleted (helpers moved into router.tsx).
shared/router-v2/common.shared.tsx Deleted (type-only shared module removed).
shared/provision/code-page/qr-scan/index.shared.tsx Deleted (type-only stub module removed).
shared/profile/pgp/import/index.shared.tsx Deleted (type-only stub module removed).
shared/profile/pgp/choice/index.shared.tsx Deleted (type-only stub module removed).
shared/people/index.tsx Moves implementation previously in index.shared.tsx into the primary module file.
shared/people/index.shared.tsx Deleted (implementation moved into index.tsx).
shared/login/user-card/index.tsx Inlines Props type previously sourced from a shared type file.
shared/login/user-card/index.shared.tsx Deleted (types moved into index.tsx).
shared/login/relogin/index.tsx Inlines Props type previously sourced from a shared type file.
shared/login/relogin/index.shared.tsx Deleted (types moved into index.tsx).
shared/login/forms/container.tsx Inlines Props type previously sourced from a shared type file.
shared/login/forms/container.shared.tsx Deleted (types moved into container.tsx).
shared/fs/footer/upload.tsx Inlines UploadProps type previously sourced from a shared type file.
shared/fs/footer/upload.shared.tsx Deleted (types moved into upload.tsx).
shared/fs/footer/download-wrapper.tsx Inlines Props type previously sourced from a shared type file.
shared/fs/footer/download-wrapper.shared.tsx Deleted (types moved into download-wrapper.tsx).
shared/fs/filepreview/text-view.tsx Inlines Props type previously sourced from a shared type file.
shared/fs/filepreview/text-view.shared.tsx Deleted (types moved into text-view.tsx).
shared/fs/filepreview/pdf-view.tsx Inlines Props type previously sourced from a shared type file.
shared/fs/filepreview/pdf-view.shared.tsx Deleted (types moved into pdf-view.tsx).
shared/engine/index.shared.tsx Deleted (type-only stub module removed; types re-homed).
shared/engine/index.platform.tsx Moves/defines exported platform client types locally instead of via a shared type module.
shared/engine/index.platform.shared.tsx Deleted (types moved into index.platform.tsx).
shared/engine/index-impl.tsx Re-homes exported engine types previously declared in the deleted shared type module.
shared/common-adapters/zoomable-image.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/zoomable-image.shared.tsx Deleted (types moved into zoomable-image.tsx).
shared/common-adapters/with-tooltip.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/with-tooltip.shared.tsx Deleted (types moved into with-tooltip.tsx).
shared/common-adapters/web-view.tsx Inlines exported WebView prop/injection types previously sourced from a shared type file.
shared/common-adapters/web-view.shared.tsx Deleted (types moved into web-view.tsx).
shared/common-adapters/video.tsx Inlines prop types and URL-check helper previously sourced from a shared module.
shared/common-adapters/video.shared.tsx Deleted (types/helpers moved into video.tsx).
shared/common-adapters/toast.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/toast.shared.tsx Deleted (types moved into toast.tsx).
shared/common-adapters/switch-toggle.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/switch-toggle.shared.tsx Deleted (types moved into switch-toggle.tsx).
shared/common-adapters/scroll-view.tsx Inlines exported ref/event/props types previously sourced from a shared type file.
shared/common-adapters/scroll-view.shared.tsx Deleted (types moved into scroll-view.tsx).
shared/common-adapters/safe-area-view.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/safe-area-view.shared.tsx Deleted (types moved into safe-area-view.tsx).
shared/common-adapters/radio-button.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/radio-button.shared.tsx Deleted (types moved into radio-button.tsx).
shared/common-adapters/progress-indicator.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/progress-indicator.shared.tsx Deleted (types moved into progress-indicator.tsx).
shared/common-adapters/keyboard-avoiding-view.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/keyboard-avoiding-view.shared.tsx Deleted (types moved into keyboard-avoiding-view.tsx).
shared/common-adapters/image.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/image.shared.tsx Deleted (types moved into image.tsx).
shared/common-adapters/header-buttons.tsx Inlines HeaderBackButtonProps type previously sourced from a shared type file.
shared/common-adapters/header-buttons.shared.tsx Deleted (types moved into header-buttons.tsx).
shared/common-adapters/floating-picker.tsx Inlines exported picker item/props types previously sourced from a shared type file.
shared/common-adapters/floating-picker.shared.tsx Deleted (types moved into floating-picker.tsx).
shared/common-adapters/emoji/native-emoji.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/emoji/native-emoji.shared.tsx Deleted (types moved into native-emoji.tsx).
shared/common-adapters/emoji/custom-emoji.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/emoji/custom-emoji.shared.tsx Deleted (types moved into custom-emoji.tsx).
shared/common-adapters/drag-and-drop.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/drag-and-drop.shared.tsx Deleted (types moved into drag-and-drop.tsx).
shared/common-adapters/copyable-text.tsx Inlines removed shared Props type dependency and defines final props locally.
shared/common-adapters/copyable-text.shared.tsx Deleted (types moved into copyable-text.tsx).
shared/common-adapters/clickable-box.tsx Inlines Props/Props2 type definitions previously sourced from a shared type file.
shared/common-adapters/clickable-box.shared.tsx Deleted (types moved into clickable-box.tsx).
shared/common-adapters/choice-list.tsx Inlines Option/Props types previously sourced from a shared type file.
shared/common-adapters/choice-list.shared.tsx Deleted (types moved into choice-list.tsx).
shared/common-adapters/checkbox.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/checkbox.shared.tsx Deleted (types moved into checkbox.tsx).
shared/common-adapters/box.tsx Inlines Box2Props/LayoutEvent type definitions previously sourced from a shared type file and adjusts exports.
shared/common-adapters/box.shared.tsx Deleted (types moved into box.tsx).
shared/common-adapters/back-button.tsx Inlines Props type previously sourced from a shared type file.
shared/common-adapters/back-button.shared.tsx Deleted (types moved into back-button.tsx).
shared/common-adapters/animation.tsx Inlines exported AnimationType/Props types previously sourced from a shared type file.
shared/common-adapters/animation.shared.tsx Deleted (types moved into animation.tsx).
shared/chat/pdf/index.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/pdf/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/inbox/row/small-team/swipe-conv-actions/index.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/inbox/row/small-team/swipe-conv-actions/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/conversation/rekey/you-rekey.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/conversation/rekey/you-rekey.shared.tsx Deleted (types moved into you-rekey.tsx).
shared/chat/conversation/normal/index.shared.tsx Deleted (type-only stub module removed).
shared/chat/conversation/messages/wrapper/long-pressable/index.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/conversation/messages/wrapper/long-pressable/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/conversation/messages/wrapper/exploding-height-retainer/index.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/conversation/messages/wrapper/exploding-height-retainer/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/conversation/messages/text/unfurl/unfurl-list/image/video.tsx Moves helper hook/styles into the implementation file instead of importing from a shared module.
shared/chat/conversation/messages/text/unfurl/unfurl-list/image/video.shared.tsx Deleted (helpers moved into video.tsx).
shared/chat/conversation/messages/attachment/video/videoimpl.tsx Moves helper hook/styles into the implementation file instead of importing from a shared module.
shared/chat/conversation/messages/attachment/video/videoimpl.shared.tsx Deleted (helpers moved into videoimpl.tsx).
shared/chat/conversation/list-area/index.tsx Inlines ItemType type previously sourced from a shared type file.
shared/chat/conversation/list-area/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/conversation/input-area/suggestors/suggestion-list.tsx Inlines generic Props type previously sourced from a shared type file.
shared/chat/conversation/input-area/suggestors/suggestion-list.shared.tsx Deleted (types moved into suggestion-list.tsx).
shared/chat/conversation/input-area/filepicker-popup/index.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/conversation/input-area/filepicker-popup/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/conversation/attachment-fullscreen/index.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/conversation/attachment-fullscreen/index.shared.tsx Deleted (types moved into index.tsx).
shared/chat/audio/audio-video.tsx Inlines Props type previously sourced from a shared type file.
shared/chat/audio/audio-video.shared.tsx Deleted (types moved into audio-video.tsx).
plans/split-ts.md Deleted plan document.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +22
const [lastAutoPlay, setLastAutoPlay] = React.useState(autoPlay)
const [lastUrl, setLastUrl] = React.useState(url)
if (lastAutoPlay !== autoPlay || lastUrl !== url) {
setLastAutoPlay(autoPlay)
setLastUrl(url)
setPlaying(autoPlay)
}
Comment on lines +16 to +19
if (lastUrl !== url) {
setLastUrl(url)
setShowPoster(true)
}
* fix: key/fetch_private hangs 60s on stale connections, blocking devices screen

sync_secret.go and per_user_key.go both set RetryCount:5 on their APIArgs
but left InitialTimeout at zero. In doRetry, when InitialTimeout==0 and
RetryCount>0, the per-attempt timeout falls back to cli.cli.Timeout which
is HTTPDefaultTimeout (60s). A stale keep-alive TCP connection in Go's HTTP
pool causes the first attempt to silently hang for the full 60s before the
OS detects the dead connection. Worst case with 5 retries: 5 minutes, which
is why the devices screen appears to never load.

Fix: add InitialTimeout:HTTPRetryInitialTimeout (1s) and the standard
RetryMultiplier to both sites. A stale connection now fails fast, and the
retry gets a fresh connection and succeeds in a few seconds.

* fix typo

* use NewRetryAPIArg
@chrisnojima chrisnojima merged commit e44f4dc into nojima/HOTPOT-next-670-clean-2 May 26, 2026
@chrisnojima chrisnojima deleted the nojima/HOTPOT-shared-cleanup branch May 26, 2026 19:09
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.

2 participants