Skip to content

Move to production#3772

Merged
Baalmart merged 57 commits into
masterfrom
staging
Jul 9, 2026
Merged

Move to production#3772
Baalmart merged 57 commits into
masterfrom
staging

Conversation

Bwanika Robert and others added 30 commits July 6, 2026 12:57
Backs the mobile app's new selfie filter feature with a `/selfies` wall page
for the conference venue display (auto-polling grid, double-tap + staff PIN
to moderate) and a temporary in-memory submissions API, so the feature is
demoable end-to-end before the real AirQo backend has equivalent endpoints.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The wall page used generic black/white styling with no AirQo branding, all
active submissions in one long scrolling grid, and a POST endpoint that
accepted any imageUrl with no auth — all flagged by the user and CodeRabbit
as needing fixes before this goes live at the event.

- Wall page now uses the site's real logo and brand blue (#145DFF) instead
  of generic dark-UI colors, and shows 8 selfies at a time in an
  auto-advancing slideshow (framer-motion crossfade + page dots) rather
  than everything at once
- Long-press added alongside double-tap for moderation, since a wall
  display has no cursor to hover/right-click with
- POST now requires a shared secret header from the mobile app
  (x-clean-air-forum-secret) and validates imageUrl actually points at the
  Cloudinary folder the app uploads to, closing the "anyone who finds this
  endpoint can push arbitrary images onto the public wall" gap
- Both the submission secret and moderation PIN checks now fail closed
  (with a logged warning) if unset in production, instead of silently
  leaving the endpoint open — they still skip the check in dev/preview
- Added a best-effort per-IP rate limit (5/minute) on submissions to blunt
  spam before staff can react

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Documents what this feature still needs from other teams before it's
production-grade: real backend endpoints to replace the temporary
in-memory store, Cloudinary upload-preset hardening, the new env
vars/secrets that need wiring into the deploy workflows (left as docs
rather than editing the workflow YAML directly), and a note to confirm
the hardcoded event dates before launch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Edition and date range confirmed correct with the events team, and
updated the PR reference now that #3753 is closed in favor of #3755
(mobile) and #3756 (website).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds src/vertex/public/install.sh, servable at
https://vertex.airqo.net/install.sh via `curl -fsSL ... | bash`,
mirroring the "Terminal" install option on cursor.com/download.

Security-hardened by design, not just convenience:
- Never re-execs itself as root; only the single `apt install` step
  escalates via sudo, and only when not already root.
- Verifies the downloaded .deb/.AppImage's sha512 against the
  official latest-linux.yml manifest electron-builder already
  publishes (the same one electron-updater trusts for auto-updates),
  refusing to install on mismatch.
- Resolves the exact "latest" release + asset via the GitHub API
  rather than a hardcoded/guessed URL, with explicit handling for
  rate-limit (403/429) and network failures.
- Rejects unsupported architectures (e.g. arm64, not built yet)
  instead of silently downloading the wrong binary.
- Uses `mktemp -d` + an EXIT trap for safe, cleaned-up temp handling;
  no predictable /tmp paths.
- Falls back to a portable .AppImage under ~/.local/bin (no root
  needed at all) when apt/dpkg isn't available.

Verified end-to-end against the real v0.1.11 release: JSON/YAML
parsing, a real checksum-verified download, and a deliberately
corrupted file correctly failing verification.

Also adds a Cache-Control (5 min) + explicit Content-Type header for
/install.sh in both next.config.js and next.config.mjs, so script
fixes propagate quickly rather than being cached indefinitely, and
documents the change in src/vertex/app/changelog.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Deleted selfies API routes and associated logic for handling submissions and moderation.
- Removed SelfiesWallPage component and its related styles.
- Introduced new Faces of Clean Air page and service to display air quality selfies.
- Updated footer and navigation to include links to the new Faces of Clean Air section.
- Implemented a new service for fetching submissions from the backend.
- Added new UI components for displaying submissions with improved styling and animations.
Replace grep -P (PCRE) with portable POSIX sed for release JSON
parsing, since some minimal Linux distros lack PCRE support in grep
and would abort the installer under set -e. This also fixes no-match
cases falling through to the intended error messages instead of
aborting silently.

Also restrict .deb install detection to apt only (not apt || dpkg),
matching what install_deb() actually invokes, and update the usage
text and changelog to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Swap the temporary website mock API for the new POST /api/v2/users/selfies
endpoint. Drops the interim shared-secret header and attaches the user's
JWT when a valid one is available so their real name shows on the wall;
anonymous submissions continue to work unchanged.
Mirrors the BaseRepository DIP pattern so tests can swap the refresher,
and tightens the eventId doc to state the wall-matching constraint.
Omit optional fields instead of sending explicit nulls, and default the
event ID to clean-air-forum-2026 to match the wall's current event.
Lets widget tests exercise the consent-to-wall flow with a fake service
instead of real HTTP; production behavior is unchanged (defaults to the
shared instance).
Mozart299 and others added 6 commits July 8, 2026 16:18
- guard _submitToConferenceWall against concurrent Retry/share taps
- dispose the captured ui.Image after PNG encoding
- stop logging the uploaded selfie URL
- surface malformed Cloudinary 200 responses as SelfieSubmissionException
Hand-constructing the GitHub download URL from the release tag and asset
name assumes the name is URL-safe. Look up the API-provided
browser_download_url instead, keeping asset_name only for the checksum
manifest lookup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7bfc9690-bd18-45eb-8209-492c73adbbe4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

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.

@Baalmart
Baalmart requested review from Codebmk and Mozart299 July 8, 2026 14:47
github-actions Bot and others added 15 commits July 8, 2026 17:50
Addresses a Stylelint deprecation warning on the sidebar text-wrapping
fix; overflow-wrap: anywhere is the standards-based equivalent.
Fix docs sidebar text clipping and hidden dropdown/caret icons
…tial backoff for error handling in usePollingWithVisibility hook
…ors and improve polling logic to prevent stale data
Matches the linked issue's specified copy for the device location map empty state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…selfie-filter-website

Add Clean Air Forum selfie wall display and harden submission API
@Baalmart
Baalmart requested a review from OchiengPaul442 July 9, 2026 05:05
Baalmart added 2 commits July 9, 2026 08:07
Add Localized Map Card to Device Details Page
…selfie-filter-mobile

fix(mobile): update Clean Air Forum selfie filter title and dates
@Baalmart
Baalmart requested a review from 2phonebabykeem July 9, 2026 05:18
@Baalmart
Baalmart merged commit 520daf3 into master Jul 9, 2026
2 of 4 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.

5 participants