Skip to content

Reenable pull-to-refresh, fix mobile zooming on edit, update search modal#1773

Merged
prxt6529 merged 6 commits intomainfrom
mobile-issues-21-01
Jan 21, 2026
Merged

Reenable pull-to-refresh, fix mobile zooming on edit, update search modal#1773
prxt6529 merged 6 commits intomainfrom
mobile-issues-21-01

Conversation

@prxt6529
Copy link
Copy Markdown
Collaborator

@prxt6529 prxt6529 commented Jan 21, 2026

Summary by CodeRabbit

  • New Features

    • Pull-to-refresh added to the app header.
  • Improvements

    • Search modal: more reliable loading, retry, and no-results behavior with smoother result handling.
    • Rich text editor expanded with improved mentions, emoji, lists, code fences, and Markdown import/export.
  • Bug Fixes

    • Header/search keyboard and focus flows improved.
    • Layout spacing adjusted for certain native environments.
  • Styles

    • Improved touch sizing for capacitor-native contexts.
  • Tests

    • Tests updated to stub pull-to-refresh and better simulate search queries.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Refactors header search to a derived-state pattern replacing local fetch flags; adds a header-triggered PullToRefresh wired from AppLayout and removes its Capacitor gating; expands Lexical editor integrations in EditDropLexical; and updates tests/mocks and global styles for capacitor contexts.

Changes

Cohort / File(s) Summary
Header Search State Refactor
components/header/header-search/HeaderSearchModal.tsx
Replace local fetch flags/state machine with a useMemo-derived derivedState; rewire query enablement to shouldSearchDefault; switch query defaults to placeholderData while exposing keepPreviousData; update Enter/retry handlers, refetch logic, and render branches to use derivedState.
PullToRefresh Integration
components/layout/AppLayout.tsx, components/providers/LayoutWrapper.tsx, components/providers/PullToRefresh.tsx
Add headerRef in AppLayout and mount PullToRefresh(triggerZoneRef=headerRef); LayoutWrapper removes prior PullToRefresh render. PullToRefresh now accepts PullToRefreshProps { triggerZoneRef }, removes Capacitor gating, and gates activation via triggerZoneRef.current.contains() with internal touch/pull state.
Lexical editor expansion
components/waves/drops/EditDropLexical.tsx
Add and rewire many Lexical plugins, nodes, transformers, and markdown import/export helpers (mentions, hashtags, emoji, PlainTextPastePlugin, safe markdown transformers, code-fence handling); update initialization, normalization, and mention-reconstruction logic; extend public props for editor component.
Tests / React Query mocks
__tests__/components/header/HeaderSearchModal.test.tsx, __tests__/components/header/header-search/HeaderSearchModalFocus.test.tsx, __tests__/components/layout/AppLayout.test.tsx
Extend mocked react-query surface with useInfiniteQuery and keepPreviousData; stub PullToRefresh in AppLayout tests to return null.
Styling & layout tweaks
styles/globals.scss, components/brain/my-stream/layout/LayoutContext.tsx
Add body.capacitor-native sizing/touch CSS and adjust capSpace calculation to apply only for iOS (remove Capacitor from combined condition).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User as User
  participant App as AppLayout
  participant Header as HeaderSearchModal
  participant PTR as PullToRefresh
  participant Q as ReactQuery

  User->>App: load page
  App->>Header: render header, attach headerRef
  App->>PTR: mount PullToRefresh(triggerZoneRef=headerRef)
  User->>PTR: touch/drag on header (target inside headerRef)
  PTR->>PTR: track touch, compute pullDistance
  PTR->>App: emit refresh on release
  App->>Q: trigger refetches for relevant queries
  User->>Header: type search term
  Header->>Q: debounce → queries (enabled by shouldSearchDefault)
  Q-->>Header: return data / loading / error
  Header->>User: render UI based on derivedState
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • simo6529
  • ragnep

Poem

🐰
I hopped through refs and debounced streams,
Replaced old flags with cleaner dreams,
A pull, a blur, a refreshed scene,
Queries hum where states convene,
Tiny paws, big tidy beams ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the three main changes: re-enabling pull-to-refresh, fixing mobile zooming on edit, and updating the search modal.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

@prxt6529 prxt6529 changed the title Reenable pull-to-refresh, fix mobile zooming on edit, update search m… Reenable pull-to-refresh, fix mobile zooming on edit, update search modal Jan 21, 2026
@prxt6529 prxt6529 merged commit a05373d into main Jan 21, 2026
7 checks passed
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