Skip to content

Staging to main#4

Open
prachinayak1509 wants to merge 116 commits into
mainfrom
staging
Open

Staging to main#4
prachinayak1509 wants to merge 116 commits into
mainfrom
staging

Conversation

@prachinayak1509

Copy link
Copy Markdown
Contributor

No description provided.

prachinayak1509 and others added 20 commits May 25, 2026 12:48
Adds a Chat tab to the mobile app, replicating the web feed:
- Inverted message stream (newest at bottom), keyset-paginated older on scroll-up,
  compose bar that posts text via the user's location; the viewer's own
  not-yet-approved posts show greyed with an "under review" badge.
- Rich content: issue cards (fetch by id, hero image, type/status/place/counts,
  tap → issue detail), link previews (hero image + site + title, tap to open),
  media photos. Event refs as a styled line.

Global hashtag selector in the header (shared across all tabs via HashtagContext):
- Tappable header title opens a sectioned picker: Near you (GPS-resolved) ·
  #india (all localities) · Recent (persisted history) · All (searchable).
- Selection is persisted and drives Chat, Map (issues now loaded by
  /api/v1/issues?locality=, #india = all), Issues list, and Events filtering.

New: api/Feed.ts, models/Feed.ts, utils/useFeed.ts, utils/HashtagContext.tsx,
components/chat/*. getIssuesByHashtag added to api/IssueDetail.ts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The map stayed glued to the user's current location regardless of the selected
hashtag. Now the viewport follows the hashtag:
- On hashtag change, fit the map to that hashtag's loaded markers (issues +
  events). #india fits all markers across India; a locality (#pune) fits that
  locality's data area.
- The user's GPS is only folded into the bounds when the selected hashtag is
  their own home hashtag — so "current location" only matters there.
- Remove the no-filter "snap back to user locality" zoom that was overriding the
  hashtag view (the root cause). The sub-filter (category/status/mine) zoom is
  unchanged; the hashtag-fit owns the default view.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The fit only worked for #india because of a race: on switching to another
hashtag the fit effect ran before that hashtag's issues loaded, fit the previous
(stale/empty) markers, and marked the hashtag as fitted — so when the real data
arrived the ref guard blocked the actual fit.

- Gate the fit on a new `loadedHashtag` that's set only when a load COMPLETES, so
  we fit the data that actually belongs to the selected hashtag.
- On empty coords, don't mark the hashtag fitted (let a later data arrival fit).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(map): fit map to selected hashtag's data, not GPS
@singhalvivek
singhalvivek marked this pull request as ready for review June 16, 2026 09:41
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.

3 participants