Last 12 weeks ยท 33 commits
4 of 6 standards met
Rapid requires in the Content Security Policy because pixi.js v8 uses for dynamic code generation (uniform syncing, shader syncing, UBO sync, particle updates). iD does not have this requirement. Change pixi.js 8.x ships a submodule that monkey-patches the relevant prototype methods with static polyfill equivalents, eliminating the calls entirely. Import it at the top of before pixi.js initializes: This installs polyfills for: / Rapid now works under a strict CSP with no allowance. Original prompt This section details on the original issue you should resolve* Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support. ### Description Rapid requires an 'unsafe-eval' CSP flag, whereas iD does not. I don't believe it is necessary to require unsafe evaluations, and thus I consider this a bug. ### Screenshots _No response_ ### Version 2.5.2 ### What browser are you seeing the problem on? What version are you running? Chrome v137 ### The OS you're using _No response_ ### Steps to reproduce Set the following response header: ### The browser URL at the time you encountered the bug Unavailable ### The auto-detected useragent string for your browser (leave blank if you're manually filling this form out) _No response_ ## Comments on the Issue (you are @copilot in this section) Fixes facebook/Rapid#1718 ๐ฌ We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Quick fixes for validation (set as inner/outer, remove from relation) were broken โ clicking them threw . The handlers were written as arrow functions, which capture lexically (undefined in module scope) instead of binding to the instance at call time. Since invokes them as , they need to be regular functions so resolves to the instance (which has set). Change โ two handlers changed from arrow to regular functions: Affects both the handler (set as inner/outer) and the remove-from-relation handler. Original prompt This section details on the original issue you should resolve* Validation fixes are broken ### Description the validation (and maybe others?) quick fixes don't work. I suspect the issue was introduced in facebook/Rapid#961 which replaced the at https://github.com/facebook/Rapid/blob/main/modules/validations/missing_role.js#L95 with a style func, which given the use of seems problematic. ### Screenshots ### Version 2.5.5 ### What browser are you seeing the problem on? What version are you running? Firefox v141.0 ### The OS you're using mac ### Steps to reproduce create a multipolygon relation and don't add inner/outer roles, when you click the fix to add inner or outer, nothing happens and you get an error in the console. ### The browser URL at the time you encountered the bug https://rapideditor.org/edit#map=20.82/37.50696/-77.43077&background=USGS-Imagery&id=r-1 ### The auto-detected useragent string for your browser (leave blank if you're manually filling this form out) Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0 ## Comments on the Issue (you are @copilot in this section) Fixes facebook/Rapid#1729 โจ Let Copilot coding agent set things up for you โ coding agent works faster and does higher quality work when set up for your repo.
Repository: facebook/Rapid. Description: The OpenStreetMap editor driven by open data, AI, and supercharged features Stars: 617, Forks: 118. Primary language: JavaScript. Languages: JavaScript (96.5%), CSS (3.3%), HTML (0.2%). License: ISC. Homepage: https://rapideditor.org Latest release: rapid-2.5.6 (4w ago). Open PRs: 13, open issues: 297. Last activity: 22h ago. Community health: 75%. Top contributors: bhousel, quincylvania, jfirebaugh, tmcw, ansis, Bonkles, samanpwbb, tannerwuster, dependabot[bot], kymckay and others.
JavaScript
Network-level errors (, ) thrown by as were silently swallowed in catch blocks, which only handled and . This meant the app got no feedback and no event when the OSM API was completely unreachable. Changes All fetch catch blocks* (, , , , , ): removed the -specific guard so all non-abort errors are forwarded to the error callback: : added to the capabilities so a hanging connection fails fast instead of waiting for the OS TCP timeout (2+ min). Original prompt This section details on the original issue you should resolve Handle OSM API Timeouts Followup on facebook/Rapid#1304 We already handle a bunch of different error conditions with the OSM API. But when things get really bad, we don't even get a response from the or any of the other calls, just a connection timeout: !Screenshot 2024-07-11 at 9 41 22 AM We should handle this situation too. ## Comments on the Issue (you are @copilot in this section) Fixes facebook/Rapid#1487 ๐ฌ We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
All usages prevent esbuild from tree-shaking unused PIXI exports. This replaces them with explicit named imports across 25 files. Changes 25 modules converted* โ each file now imports only what it uses, e.g.: โ merged into its existing named import โ dropped which was only referenced in commented-out code โ left unchanged; intentionally exposes the full namespace via for the Pixi DevTools Chrome extension โ removed from since the full namespace is no longer available in that module; dev tooling still works via set in [!WARNING] Firewall rules blocked me from connecting to one or more addresses (expand for details) #### I tried to connect to the following addresses, but was blocked by firewall rules: Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) Triggering command: (dns block) If you need me to access, download, or install something from one of these locations, you can either: Configure Actions setup steps to set up my environment, which run before the firewall is enabled Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only) Original prompt This section details on the original issue you should resolve Convert globbed imports from PIXI to explicit package imports Currently our code is sprinkled with we should REALLY convert these to explicit imports a la: The latter will allow esbuild to tree-shake more effectively and get rid of things we don't use. ## Comments on the Issue (you are @copilot in this section) @Bonkles Did some work on this today but it seems that we have some snags: 1) Resource loading doesn't work the same way apparently- the Promises being returned by the loader aren't including the 'textures' object which the helpers.js and others rely on. 2) The Pixi debugger chrome extension relies on a full bundle to be defined as PIXI 3) There were no bundle size savings even after doing it. (stored on my local 'import_rework' branch) Fixes facebook/Rapid#618 ๐ฌ We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.