Mobile-web parity, share embeds, locate on grant, no mini-map (#129, #135, #136, #137) - #33
Conversation
…s, FEED_RANKING schema
…ars, ink var typos
…ion units, console opacity
…ending ids cleared on identity change
…; non-pager pills keep accent ink
…of dropping null-identity rows
… state, plus the appstore bake tripwire
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The announcement is event content, not a private message: targeting decides who is NOTIFIED, never who may read, so the event-detail section and the detail page are public and carry no audience chip or delivery counts. Those host-only fields are absent from the public projection, and that absence IS the gate the card reads. Nav kinds `announcements` (/cleanups/:id/announcements) and `announcement` (/cleanups/:id/announcements/:announcementId) are registered across the union, ALL_DETAIL_KINDS, entryFromPath/pathForEntry, DETAIL_BODY, BODY_LAYOUT and BodyRouter, plus mobile route wrappers and SHELL_HOST_ROUTE_NAMES. The detail path is exactly the link the API puts on an announcement notification, so a push tap deep-links straight into it; notificationNav.test.ts now enumerates both. ENTRY_IDENTITY_FIELDS gains `announcementId`, which lengthens the entry discriminator - the four pinned layer-key literals move with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… launch move yields to show on map
… feat/mobile-web-parity-share-embeds
|
| if (before !== "prompt") return { precise, prompted: false } | ||
| const after = await geolocationPermissionState() | ||
| return { precise, prompted: after === "granted" } |
There was a problem hiding this comment.
If a browser returns a successful geolocation fix but its Permissions API is unavailable, rejects, or remains "prompt", this code reports prompted: false. The remembered-camera guard then keeps the map at the prior city instead of flying to the newly granted user location. Treat a successful initial location callback as grant evidence when permission-state queries cannot reliably establish the transition.
Artifacts
- The executed Vitest source verbatim stubs browser APIs, triggers a successful position callback, and checks the composed camera decision; it demonstrates the affected path.
- The control command completed successfully and shows a detectable grant releases the remembered camera and permits the precise-location fly.
- The reproduction command completed successfully and shows all three API variants retain the remembered camera despite receiving precise coordinates.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/community-web/src/lib/locate.ts
Line: 139-141
Comment:
**Location grant is ignored**
If a browser returns a successful geolocation fix but its Permissions API is unavailable, rejects, or remains `"prompt"`, this code reports `prompted: false`. The remembered-camera guard then keeps the map at the prior city instead of flying to the newly granted user location. Treat a successful initial location callback as grant evidence when permission-state queries cannot reliably establish the transition.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| left: env(safe-area-inset-left, 0px); | ||
| right: env(safe-area-inset-right, 0px); | ||
| background: var(--paper); | ||
| overflow: hidden; | ||
| touch-action: manipulation; | ||
| --ios-focus-zoom-floor: 16px; | ||
| } | ||
|
|
||
| body:not(:has(.cf-shell)) { | ||
| height: auto; | ||
| min-height: 100%; | ||
| padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) | ||
| env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); |
There was a problem hiding this comment.
These safe-area fallbacks and the input-size floor introduce raw px values, including 0px and 16px, instead of consuming semantic CSS variables or theme tokens. This violates the repository’s frontend styling directive; define and use semantic tokens for these values. The repository requirement must be satisfied before merging.
Rule Used: # civfix review rules civfix is a live civic-tech platform that will hold government contracts. Review every PR for correctness, security and performance. Flag real defects with evidence; skip style nits that lint already covers. ## Repos - **... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/community-web/src/styles/design.css
Line: 240-252
Comment:
**Use semantic style tokens**
These safe-area fallbacks and the input-size floor introduce raw `px` values, including `0px` and `16px`, instead of consuming semantic CSS variables or theme tokens. This violates the repository’s frontend styling directive; define and use semantic tokens for these values. The repository requirement must be satisfied before merging.
**Rule Used:** # civfix review rules civfix is a live civic-tech platform that will hold government contracts. Review every PR for **correctness, security and performance**. Flag real defects with evidence; skip style nits that lint already covers. ## Repos - **... ([source](https://app.greptile.com/civfix/-/custom-context?memory=39a53925-3d93-4c82-980e-27b67393717d))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Comments Outside DiffThese findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.
|
Resolves civfix/issue-tracker#129
Resolves civfix/issue-tracker#135
Resolves civfix/issue-tracker#136
Resolves civfix/issue-tracker#137
What changed
Before you start
https://github.com/civfix/civfix-backend/pull/77. Post link cards need it deployed to staging.Verify
#129 — full pages on a phone browser — [Web] phone width
Use a phone, or the browser's phone emulation.
#129 — the desktop layout is unchanged — [Web] desktop
#135 — the map moves to you when you allow location — [Web] desktop and phone
Set civfix.dev's location permission in the browser to "Ask" before each step. Open the map once beforehand and pan to another city so a remembered view exists.
#135 — the map moves to you when you allow location — [Mobile]
Fresh install, so location has never been asked.
#136 — report link cards — [Web] and [Mobile]
#136 — event link cards — [Web] and [Mobile]
Signed in as the host.
#136 — post link cards — [Web] and [Mobile]
Needs the backend PR deployed to staging.
#136 — organization and profile link cards — [Web] and [Mobile]
#137 — event pages without the small map — [Web] and [Mobile]
#137 — "Show on map" — [Web] desktop
#137 — "Show on map" — [Web] phone width
#137 — "Show on map" — [Mobile]
Regression
Moving around full pages on a phone browser — [Web] phone width
Space around the notch and home bar — [Web] iPhone Safari
"Show on map" and the report pin tools — [Web] [Mobile]
Post addresses on web — [Web]
Link cards for every other link — [Web]
When the web map moves to you — [Web]
Location on mobile — [Mobile]
The address row — [Web] [Mobile]
The app-download banner — [Web] phone browser
Leaving a linked screen on mobile — [Mobile]
Event pages — [Web] [Mobile]
Dark mode, reduced motion and home-screen app — [Web] phone width
When the server can't be reached — [Web] local
Run the web app locally with the API stopped.
Not covered