Open
Conversation
Closed
scutuatua-crypto
approved these changes
Feb 16, 2026
# Conflicts: # shared/constants/init/index.native.tsx # shared/constants/platform-specific/index.desktop.tsx # shared/constants/router2/index.tsx # shared/stores/archive.tsx # shared/stores/config.tsx
* move from box to box2
* try automated perf harness
* rename numbered things back to root
* WIP * WIP
* merge chat input down into one file
* small jsi improvements * handle common types first
* Migrate inbox native list from FlatList to LegendList with recycling * Tune LegendList: drawDistance=250 for best scroll FPS
* unify inbox with legend list * unify more
* kb.list to legends * merge desktop and native * lint
* Add teams list perf testing with Maestro flow and React Profiler wraps
* adopt rn ref api to cleanup
* Fix orange line race condition on desktop Two issues fixed: 1. On desktop, the NormalWrapper component doesn't remount when switching conversations (ChatProvider just changes id prop). The initial load useEffect had empty deps [], so loadOrangeLine never fired for subsequent conversation switches. Changed to depend on [id, loaded]. 2. The getUnreadline RPC raced with markThreadAsRead - both fire to the Go service, and if mark-read was processed first, the service returned no unread line. Fixed by snapshotting meta.readMsgID during render (before any effects) and passing it to the RPC. Also wait for loaded state so the Go service has messages in its local cache. * Fix teams divider badge to only count hidden small team unread The divider was showing smallTeamBadgeCount which includes all small teams. Now subtracts badge counts from visible small team rows so the badge only reflects unread messages in hidden/collapsed conversations. * Fix lint: use useMemo instead of ref writes during render Replace ref-during-render pattern with useMemo to snapshot readMsgID when conversation id changes, satisfying react-hooks/refs lint rule.
trim → .trim(), isArray → Array.isArray, includes → .includes(), assign → Object.assign, clamp → Math.min/max, range → Array.from, uniq → [...new Set()]
Guard DOM element behind isMobile check so it only renders on desktop.
* Add onClick/style/children to Avatar2, migrate ~60 Avatar usages
Enhance Avatar2 with onClick (including 'profile'), style, and children
props. Migrate all Avatar consumers that don't use rare props (editable,
imageOverrideUrl, lighterPlaceholders, showFollowingStatus, crop, blocked)
to Avatar2.
Convert borderColor prop to boxShadow style inline (with borderRadius),
drop skipBackground/loadingColor (Avatar2 doesn't need them).
Remaining ~10 Avatar usages with rare props will be migrated in a
follow-up PR.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate remaining Avatar usages to Avatar2, delete old Avatar
- Add imageOverrideUrl, crop, and placeholder-on-error to Avatar2
- Migrate all remaining ~10 Avatar consumers to Avatar2
- Handle editable/showFollowingStatus as Avatar2 children
- Drop lighterPlaceholders (use standard placeholder)
- Delete old Avatar component (hooks, index, CSS)
- Remove dead Avatar import from rich-button
- Add start-hot-debug script to help debug Electron
* Rename Avatar2 to Avatar, move into common-adapters/avatar/
Pure rename: Avatar2 → Avatar across ~75 files. Move implementation
from avatar2.{d.ts,desktop.tsx,native.tsx,css} into avatar/ directory.
* Switch desktop avatar from <img> to background-image to eliminate scroll flicker
<img> tags require async decode on mount even from cache, causing a visible
background flash when virtualized list rows remount during scrolling.
CSS background-image paints synchronously from memory cache.
Also add recyclingKey + cachePolicy to native expo-image for better scroll perf.
* Icon2 enhancements + ImageIcon + first migration batch
- Add onClick, className, padding, Huge/Bigger sizes to Icon2
- Create ImageIcon component for image icons (icon-* types)
- Export ImageIcon from common-adapters barrel
- Migrate 17 files from Kb.Icon to Kb.Icon2/ImageIcon
* Migrate more Icon → Icon2/ImageIcon (batch 2)
- search.tsx, jump-to-recent.tsx, reply-preview.tsx, command-status.tsx
- retention-notice.tsx, special-top-message.tsx
- no-conversation.tsx, you-are-reset.tsx, delete-history-warning.tsx
- reset-user.tsx, announcement.tsx
* Migrate Icon → Icon2/ImageIcon (batch 3: chat, teams, login, signup)
~40 files: chat cards, emoji picker, audio, payments, inbox rows,
team confirm modals, add-members wizard, emojis, channel header,
login/signup flows
* Migrate Icon → Icon2/ImageIcon (batch 4: profile, provision, settings, teams, crypto, devices, wallets, unlock-folders)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate Icon → Icon2/ImageIcon (batch 5: chat, fs, teams, tracker, team-building, menubar, settings, router)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Migrate Icon → Icon2/ImageIcon in common-adapters internal files (batch 6)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add IconAuto (auto-delegates to Icon2/ImageIcon based on type) and className to ImageIcon
- IconAuto checks iconMeta[type].isFont at runtime and renders Icon2 or ImageIcon
- Added className prop to ImageIcon (plumbed to <img> on desktop)
- Migrated all remaining dynamic-type Icon usages to IconAuto
- Fixed start-new-chat hoverColor="inital" (typo, no-op on mobile) → Icon2
* Add hoverColor to Icon2 + migrate all remaining Icon usages (complex phase)
- Added hoverColor prop to Icon2 (desktop: CSS class hover_color_*, native: ignored)
- Migrated 5 hoverColor files: banner, popup-dialog, check-circle, checkbox, search-filter
- Migrated 3 boxStyle files: search-filter (merged into style), checkbox (wrapped in Box2), name-with-icon (wrapped in Box2)
- Migrated 4 dynamic-type files to IconAuto: meta, input3.desktop, input3.native, platform-icon
- Zero remaining `import Icon from './icon'` or `<Kb.Icon` usages
* Fix Icon2 desktop default color: use black_50 instead of inheriting pure black
The old Icon component defaulted to globalColors.black_50 when no color
was specified. Icon2 was missing this default, causing icons to render
as pure black instead of the themed gray.
* Fix Icon2 size and default color regressions
- Remove gridSize from Icon2 size calculation (old Icon never used
gridSize for font size, only sizeType via typeToFontSize)
- Add explicit color to crown icons (yellowDark for owner, black_35
for admin) at all call sites that relied on old Icon defaultColor
- Add explicit color={black_20} to iconfont-close Icon2 usages
* Migrate all remaining old Icon usages to Icon2/IconAuto/ImageIcon
* Fix Icon2 CSS specificity: use class-based color instead of inline style
When Icon2's color resolves to a CSS variable (e.g. var(--color-black_50)),
use a CSS class (color_black_50) instead of an inline style. Inline styles
have higher specificity than CSS classes, which broke cases like the sidebar
tab icons where external CSS overrides the default color.
* Fix checkbox alignment: use plain div instead of Box2 for icon wrapper
Box2 adds alignSelf:'center' by default which shifted the checkbox
box position. The old Icon used a plain <div> for boxStyle, so match
that behavior.
* Add visual regression testing scripts for desktop
- visual-diff-take.js: captures all 8 app tabs via CDP
- visual-diff-compare.sh: ImageMagick pixel diff with classification
- Updated PERF-TESTING.md with workflow and diff reading guide
* Remove old Icon, rename Icon2 → Icon
Delete the old Icon component (icon.desktop.tsx, icon.native.tsx, icon.d.ts)
and rename Icon2 to Icon across the entire codebase (~180 consumer files).
- Rename types: Icon2Props → IconProps, SizeType2 → SizeType
- Strip icon.shared.tsx of unused functions (defaultColor, defaultHoverColor,
fontSize, typeToFontSize, paddingStyles)
- Move iconTypeToImgSet into the new icon.tsx with platform branching
- Remove IconStyle type, urlsToImgSet export (no consumers)
- Update barrel exports (index.d.ts, index-impl.js)
* Move iconTypeToImgSet into avatar/ since it's the only consumer
Extract iconTypeToImgSet and getMultsMap from icon.tsx/icon.shared.tsx into
a dedicated helper at common-adapters/avatar/icon-to-img-set.tsx. This keeps
the icon module focused on the Icon component itself.
* Add hint prop to Icon, rendered as title tooltip on desktop
* Restore lost hint props on download folder icons
* Use satisfies operator for type-safe object literals
Replace type annotations with satisfies on const object literals across
constants/fs.tsx, stores, and other config objects. This preserves
narrower literal types while still validating structure at compile time.
* Use Promise.withResolvers() for cleaner async patterns
Replace new Promise((resolve, reject) => { ... }) constructor pattern
with Promise.withResolvers() in 5 files. This flattens the code by
removing one level of nesting in callback-heavy async code.
* More satisfies conversions: styles, nav options, config objects
Convert type-annotated const objects in button.tsx, icon2.tsx,
avatar, router options, and inbox-rows to use satisfies.
* Final satisfies batch: installer, contacts, menubar
* Fix lint: revert installer satisfies, use undefined for Promise.withResolvers
The installer errorTypes with satisfies narrowed booleans to literal
false, causing lint errors. Reverted to type annotation.
Promise.withResolvers<void>() triggers no-invalid-void-type lint rule.
Changed to <undefined> and updated resolve() calls to resolve(undefined).
* Allow void in generic type arguments, use undefined for withResolvers
Relax no-invalid-void-type to allow void in all generic type arguments
(was only Promise). Promise.withResolvers<void>() still triggers the
rule since it's a method call not a type, so use <undefined> there.
* Revert Promise.withResolvers usage — not supported by Hermes
Reverts back to new Promise((resolve, reject) => {...}) pattern
in all 5 files that were converted.
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.
No description provided.