Refactor the `TermsSheet` component to achieve better parity with Flutter's
`DraggableScrollableSheet`. This includes implementing a snapping mechanism
between two resting states (0.75 and 1.0) and updating the CSS to handle
safe area insets and dynamic height calculations.
- Add `.flutter-draggable-sheet` class to `globals.css` for height scaling
against available screen space below the status bar.
- Implement `snapTo` logic in `TermsSheet` to handle transitions between
initial and expanded states.
- Add `restingStateRef` to track the current snapped position.
- Update `TermsSheet` touch event handlers to support snapping based on
drag distance and current size.
- Add unit tests to verify snapping behavior for pulling up, pulling down,
and reaching the minimum size threshold.
Update client-side redirection logic across multiple routes to ensure
routing decisions are only made after the profile data has been
successfully fetched from the server. This prevents premature or
incorrect redirects based on stale or incomplete hydrated data.
- Add `isFetched` check to `useEffect` guards in candidate-contact,
finding-match, new-match, request-accepted, and request-sent clients
- Update `QuestionsListClient` to wait for `isProfileFetched` before
triggering redirects
- Clean up dependency arrays to include new fetch status variables
Implement server-side extraction of marriage profile data from cookies
to seed the React Query cache during initial application load. This
reduces client-side loading states by providing immediate access to
profile information.
- Extract and parse marriage data in `RootLayout`
- Pass initial profile data to `Providers` component
- Seed `QueryClient` with `initialProfile` using `setQueryData`
- Update `getInitialMarriageProfile` to support data overrides
- Refine loading conditional in `NewMatchClient` to prevent flickering
when summary data is already present
Update client components to signal readiness to the Flutter wrapper
immediately upon mounting, rather than waiting for data hydration.
Additionally, adjust profile query settings to prioritize fresh
server-side data.
- Force `useHabibWebReady(true)` in all client-side route components
- Set `staleTime` to 0 in `useMarriageProfileQuery` to ensure fresh
data on mount
- Simplify `queryClient.setQueryData` logic in profile hook
Inject marriage data into the global window object from cookies during
the initial server-side render to prevent hydration mismatches and
reduce client-side latency.
- Add script injection in `RootLayout` to bootstrap `window.HABIB_MARRIAGE`
- Update `AuthBridge` to support `__HABIB_BOOTSTRAP__` and improved
cookie parsing logic
- Enhance `getClientCookie` with robust URI decoding error handling
Relocate the profile edit/lock button from inside the `<main>` element
to outside of it. This prevents the `page-slide-enter` animation's
`will-change: transform` property from creating a new containing block,
which was causing layout issues with `position: fixed` elements.
Refactor various client components to improve UI responsiveness, spacing, and icon sizing. Additionally, update the profile redirection logic to allow users to access specific sections when their profile is not locked.
- Update `FindingMatchClient` with improved min-height, padding, and responsive spacing.
- Standardize icon sizes using `size-[18px]` in `FindingMatchClient` and `NewMatchClient`.
- Refactor `isProfileRedirecting` in `QuestionsListClient` using `useMemo` to allow access to `finding-match` when `can_edit_profile` is true.
- Adjust `Button` component to use flexbox for better text alignment and centering.