Commit graph

57 commits

Author SHA1 Message Date
19b76a570c fix(client): render the map pages when no Google Maps key is configured
Some checks failed
build-image / test (push) Successful in 3m31s
build-image / build (push) Has been cancelled
Gkeys waited on the key VALUE to decide the script had loaded. With an empty
gmaps key (any deployment that has not got one, and settings-ci.json) the
ReactiveVar stayed falsy forever, so every component mounting after the script
had already loaded — i.e. anything reached by client-side navigation — sat on
"Waiting for the gkey" and rendered an empty <div>. /subscriptions/new was
completely blank, with no error in the console: you simply could not add a zone.

Tracking "loaded" separately from the key fixes it. Found while writing the e2e
suite, which could not get past the add-zone page.
2026-08-01 18:44:32 +02:00
bddfb392c1 bootstrap: swap BS4 (alexwine) CSS for bootstrap@5 npm
Completes the Bootstrap 4->5 migration now that every jQuery/BS4 widget is React
(navbar, carousel, dropdowns) — plus the feedback toggle here (Feedback.js:
global `$('#feedback-form').toggle()` -> React state).

- Load Bootstrap 5 CSS from the `bootstrap` npm package in client/index.js
  (imported first so app + component styles and react-bootstrap override it).
- Remove the `alexwine:bootstrap-4` meteor package (BS4 CSS + jQuery + BS4 JS).
  jQuery for jquery-validation still comes from the npm `jquery` dep.
- Utility renames to BS5: ml-auto->ms-auto, float-right->float-end,
  btn-block->w-100, data-toggle->data-bs-toggle (FromNow tooltip).
- forms.scss `.form-label` is no longer a shim (BS5 ships it); comment updated.

Full-app build boots clean; server suite 36 passing. Needs a visual staging pass
across all pages (BS4->5 shifts grid gutters/typography); forms should improve
since react-bootstrap v2 already emitted BS5 markup.
2026-07-22 05:55:34 +02:00
6b6f02d92d quality: web debt batch (tests runner, FireContainer, rate-limit, maps, i18n)
Independent-of-prod quality debt from PENDIENTE.md §2:

- test: migrate broken Jest -> meteortesting:mocha. Tests rewritten to chai +
  Meteor 3 async APIs, moved to test/server/ (server-only). test/server/
  00-setup.test.js re-runs the collection2/accounts init that `meteor test`
  skips (no server/main.js). New comments method + mediaAnalyzers coverage.
  Dropped rest.test.js (removed meteor/http; covered by smoke/). 36 passing.
- fix: scope FireContainer read by the URL _id on the archive route instead of
  a selector-less FiresCollection.findOne() (imports/ui/pages/Fires/Fires.js).
- feat: rate-limit abusable publications via rateLimitSubscriptions (fireFrom*
  and comments.forReference 5/1000ms; geo subs 10/1000ms).
- perf: append loading=async to the Google Maps loader URL (Gkeys.js).
- deps: meteor-accounts-t9n 2.0 -> 2.6 (no gl build -> keep gl->es fallback,
  documented); add 3 missing gl/common.json keys (0 missing now).
- deps: drop jest/babel/enzyme, add chai.
2026-07-21 22:59:06 +02:00
12bdbe8fed deps: i18next 10 -> 23, react-i18next 7 -> 14
Modernizes the whole i18n stack:
- 48 translate([], {wait:true}) / translate() HOCs -> withTranslation()
- react.wait:true -> react.useSuspense:false
- whitelist -> supportedLngs; added compatibilityJSON: 'v3' so our
  natural-language keys + v3 _plural layout keep working (custom
  separators ss/eth/dj preserved)
- backends: xhr -> i18next-http-backend (client), sync-fs ->
  i18next-fs-backend (server); dropped i18next-localstorage-cache
  (was enabled:false); languagedetector 2 -> 8
- ReSendEmail: <Interpolate> (removed in v10) -> <Trans values={{email}}/>,
  dropped the removed bare t export
- saveMissing handler signature (lngs, ns, key, fallbackValue)

Silences the per-component Translate/I18n legacy-context warnings.
Browser-verified es/en switch and <Trans> interpolation on /fires;
REST smoke byte-identical.
2026-07-18 06:28:41 +02:00
f1eae84e25 deps: react-helmet -> react-helmet-async 2
react-helmet 5 is unmaintained and breaks under React 18 StrictMode.
Same <Helmet> API in the 15 pages; HelmetProvider wraps <App/> in the
client entry. Browser-verified: per-page titles, meta description and
hreflang alternates all inject. REST smoke byte-identical.
2026-07-18 06:14:14 +02:00
62ac2fbd9c sentry: tunnel client events through the app to dodge Cloudflare's 503
GlitchTip is behind Cloudflare, which answers the browser's cross-site ingest
POSTs with 503 (no CORS headers -> 'Failed to fetch'); server-side requests
pass. The browser SDK now posts envelopes same-origin to /sentry-tunnel, and
the server forwards them to GlitchTip:
- imports/startup/server/sentryTunnel.js: WebApp handler that relays the raw
  envelope to <dsn>/api/<project>/envelope/?sentry_key=<key> over IPv4
  (family:4 avoids Happy-Eyeballs picking Cloudflare's unroutable IPv6 on
  IPv4-only hosts). GlitchTip authenticates by the sentry_key query, so the
  key is derived from the DSN and passed explicitly.
- client ravenLogger: tunnel: '/sentry-tunnel'.
Verified: POST /sentry-tunnel -> 200 (envelope reaches GlitchTip).
2026-07-17 18:17:47 +02:00
4ca7e198d3 meteor3: raven -> @sentry/node + @sentry/browser
flowkey:raven (Sentry legacy SDK) is dead on Meteor 3 and, with the old
sentry.comunes.org DSN unreachable, spammed the boot log with 502s on every
exception. Replaced by the modern SDKs (8.x) behind the same ravenLogger.log()
facade so the 6 call sites are unchanged. Empty DSN -> plain console logger
(same behavior as before).

End-to-end verified against a real backend: GlitchTip deployed on aaron
(Sentry-compatible, fits in ~1.5GB vs Sentry's 16GB), fronted at
sentry.comunes.org. A test exception sent from the dev server appeared in
GlitchTip within seconds. REST smoke byte-identical (12/12).
2026-07-16 12:20:02 +02:00
1892c0ead0 meteor3: React 16 -> 18.3 with createRoot
react/react-dom ^18.3.1 (--legacy-peer-deps for the pinned ancient react-*
libs, which still work on 18 via legacy context but gate React 19). Client
entry uses createRoot. Browser-verified on / and /fires; REST smoke
byte-identical (12/12).
2026-07-14 11:32:37 +02:00
eb3aec82ae meteor3: purge dead client packages — web UI renders on 3.1
alanning:roles removed (client crashed the whole bundle; plain user.roles
checks instead), selaias:cookie-consent replaced by in-repo React banner,
publish-performant-counts vendored with countAsync, Meteor.autorun dropped
(App)/Tracker.autorun (FiresMap), and the map publications not covered by
the REST smoke (activefiresmyloc, activefiresunionmyloc, fireAlerts,
oauth.verifyConfiguration) converted to async APIs.

Verified in browser: / and /fires render with map + cookie banner, zero
uncaught exceptions. REST smoke byte-identical (12/12).
2026-07-14 11:32:19 +02:00
cd570b9d9c escala 2+3: Meteor 1.8.3 -> 2.3 (Mongo 3.2 compatible), dead-package remediation
Reaches Meteor 2.3 building + running against Mongo 3.2, REST smoke test
byte-identical to the 1.6.1.1 baseline (all 12 Flutter endpoints green).

Dead/abandoned Atmosphere packages removed or replaced (the upgrade blockers):
- arkham:comments-ui (no Meteor 2.x build; pinned accounts-password@1.x):
  reimplemented the fire-page comments as a React feature:
    imports/api/Comments/ (collection, server methods, publication, media
    analyzers, new-fire-comment email) + imports/ui/components/Comments/CommentsBox.
    Comment text now rendered as safe plain text + image/youtube embed (was
    markdown-to-HTML). Wired into Fires.js; sitemaps.js + migration v11 updated
    to the new collection. Old Blaze/startup comments files deleted.
- nimble:restivus (REST API; pinned accounts-password@1.3.3, CoffeeScript source
  that crashes this build host): vendored as a local package
  packages/nimble-restivus with the .coffee precompiled to plain JS and the
  accounts-password constraint loosened to 2.x. REST behavior unchanged
  (verified by smoke test). This also dropped the entire iron:router stack.
- maximum:server-transform (+ peerlibrary:*, meteorhacks:zones/inject-initial):
  unused; removal broke Meteor.publishTransformed in FalsePositives publications
  -> replaced with plain Meteor.publish (no transform was configured).
- less, markdown (no source files), and the dead test stack
  (meteortesting:mocha, practicalmeteor:chai, xolvio:cleaner) which transitively
  pulled coffeescript@1.0.17 — the build plugin that crashed meteor-tool
  (node_contextify assertion) on this machine. Removing it unblocked the build.
- fourseven:scss 4.5.4 -> 4.14.1 (node-sass 4.5.3 doesn't build on node 12).

npm-mongo driver at 2.3 is 3.9.x — still compatible with the production Mongo
3.2 replica set.
2026-07-13 22:24:09 +02:00
Vicente J. Ruiz Jurado
dc5e38f8d5 gl fallback to es in T9 2018-08-16 19:04:46 +02:00
vjrj
12bf1ef09d RavenLogger in dev if enabled 2018-05-23 11:05:30 +02:00
vjrj
b53e5d0e36 Log ravenLogger enabled/disabled 2018-05-22 18:19:37 +02:00
vjrj
d30385b49e Disable raven when not configured 2018-05-21 17:42:37 +02:00
vjrj
b4afa820ab Added webp images for faster home load 2018-05-08 11:12:48 +02:00
vjrj
4954b907de Autoreconnect 2018-03-07 11:44:56 +01:00
vjrj
db964d247f Disabled raven in dev 2018-03-04 12:41:46 +01:00
vjrj
965a80fb3f ie9 gfys 2018-03-03 11:43:17 +01:00
vjrj
fa4af5e5fe Refactor i18n client code 2018-03-03 08:41:23 +01:00
vjrj
48dab4bb0d Refactor piwik startup 2018-03-02 21:58:14 +01:00
vjrj
45a63548c7 Added raven/sentry to server side 2018-02-16 13:12:06 +01:00
vjrj
44428be8aa Comments config 2018-02-15 22:35:23 +01:00
vjrj
dbfbba1067 Added unstranslated cookie message 2018-02-15 13:27:09 +01:00
vjrj
26d668b68c Send missing in dev 2018-02-13 09:39:23 +01:00
vjrj
966b2d56b9 Save missing fallback 2018-02-12 13:06:06 +01:00
vjrj
eca58df6c2 Fire popupsand active/archive urls 2018-02-08 11:15:23 +01:00
vjrj
464af6b9d1 More work with titles & descriptions 2018-02-07 15:27:12 +01:00
vjrj
d798aa2cdf i18n setting right 2018-02-01 06:12:01 +01:00
vjrj
61c0a65009 Error boundary for general errors 2018-01-31 18:45:17 +01:00
vjrj
81acc255d7 Added meta management via react-helmet 2018-01-30 19:10:37 +01:00
vjrj
4674b48069 Cookie consent when i18n ready 2018-01-24 19:35:55 +01:00
vjrj
952431d296 Pages (terms/tos/privacy), comments improvements, etc 2018-01-21 20:53:21 +01:00
vjrj
cd16f45d8e Style improvements for mobile 2018-01-19 11:04:14 +01:00
vjrj
40aedbfdfb Added Fires page, collection and fire comments 2018-01-17 18:23:32 +01:00
vjrj
97c47c5d1d Added user lang setting 2018-01-09 12:05:36 +01:00
vjrj
91b4197b04 Updated translations 2017-12-21 11:36:00 +01:00
vjrj
1742cd4913 Improvement in Subs and FireMap Union 2017-12-19 20:02:14 +01:00
vjrj
4c5aef6e4f Removed log 2017-12-15 17:43:01 +01:00
vjrj
8b8b145360 Added Google Maps layers. Improved key load 2017-12-13 11:56:51 +01:00
vjrj
29f9a2d476 Improved SelectionMap 2017-12-11 18:23:24 +01:00
vjrj
bdcb9a6de9 Removed lgo 2017-12-11 16:12:09 +01:00
vjrj
b6b8f893e3 Gkey improved. New pages. Home improved based in startbootstrap 2017-12-10 03:32:12 +01:00
vjrj
a0e5dc4723 i18n in server. Some fixes 2017-12-09 17:54:18 +01:00
vjrj
f1786541cd Many improvements: navbar, favico, new icons 2017-12-07 17:29:17 +01:00
vjrj
93d9ca43f1 Improved subs form 2017-12-06 17:10:47 +01:00
vjrj
df96b6e51e Subs form (wip) 2017-12-06 11:04:34 +01:00
vjrj
fe7a314d92 Added geolocation. Improved map subs. FireMap page 2017-12-01 21:18:10 +01:00
vjrj
f87cf02c2d Remove log 2017-12-01 12:57:59 +01:00
vjrj
055469055c Added piwik 2017-11-29 22:17:00 +01:00
vjrj
08824a1e4e Added sentry 2017-11-29 16:29:17 +01:00