Commit Graph

3092 Commits

Author SHA1 Message Date
Alejandro González
98269842f3 tweak(path-util): addendum to #4482 (#4486)
* tweak(path-util): addendum to #4482

These changes improve on those introduced in #4482 in two ways:

- The serialization logic for `SafeRelativeUtf8UnixPathBuf` now more
  closely mirrors the deserialization checks, reducing the chance that a
  generated path will fail to deserialize. While unlikely in practice,
  catching such theoretical cases earlier improves the experience for
  users and developers.
- After deeper testing on a clean Windows 10 VM, I found that reserved
  device names can have both an extension and an alternate data stream
  appended, not just one or the other. These changes handle that case
  more gracefully.

* chore: fix typos, add tests

* fix(path-util): extend `SafeRelativeUtf8UnixPathBuf` contract to allow `.` components

While quite useless, they were accepted by previous app versions, the
`.mrpack` specification does not forbid them, and they do not pose
security issues, so accept them for backwards compatibility.
2025-10-04 16:10:01 +00:00
Alejandro González
ab6e9dd5d7 fix(app-lib, labrinth): stricter mrpack file path validation (#4482)
* fix(app-lib, labrinth): stricter mrpack file path validation

* chore: run `cargo fmt`

* tweak: reject reserved Windows device names in mrpacks too
2025-10-04 10:35:30 +00:00
François-Xavier Talbot
a13647b9e2 Negate refund amount (#4481) 2025-10-03 23:29:22 +00:00
aecsocket
2af7ecc077 Fix affiliate PUT API (#4456)
* Fix affiliate PUT API

* PR fixes

* wip: merge affiliate code endpoints
2025-10-03 14:24:15 +00:00
François-Xavier Talbot
bea0ba017c Fix interactive payments in non-USD currencies (#4476)
* Use price's currency rather than inferred stripe currency in PaymentIntent

* Correctly convert to stripe::Currency

* Include original currency code in error message
2025-10-03 13:26:06 +00:00
Emma Alexia
f874856452 Fix user deletion with new notifications_deliveries table for real (#4473)
Maybe this will work? I dunno but users are still saying they're getting errors deleting accs. In theory it shouldn't matter if the transaction all gets committed at the same time, though, right? I can't really test this so I would like someone to tell me whether this will actually make a difference.

Co-authored-by: François-X. T <fetch@ferrous.ch>
2025-10-03 13:03:02 +00:00
aecsocket
b96c5cd5ab Improve error logging and observability (#4443)
* Replace actix tracing with custom error tracing

* Fix logging

* wip: JSON logging

* Use LABRINTH_FORMAT to change to JSON output

* sqlx fix?

* CI fix

* Add tracing span info to HTTP requests

* Merge Result and Option error wrapping

* Add http.authorized to tracing
2025-10-03 13:02:20 +00:00
François-Xavier Talbot
7e84659249 Cleanup + fixes to index_billing/index_subscriptions (#4457)
* Parse refunds

* Cleanup index subscriptions/index billing

* chore: query cache, clippy, fmt
2025-10-03 13:01:52 +00:00
François-Xavier Talbot
24504cb94d Fix CI (#4477) 2025-10-03 12:35:43 +00:00
Prospector
6fe4235358 update changelog 2025-10-01 19:01:55 -07:00
Prospector
04f0f53104 Add russian banner, blog post translation, and unlist old blog post. Adjust banner colors in dark mode (#4468)
* Add russian banner, blog post translation, and unlist old blog post. Adjust banner colors in dark mode

* russia
2025-10-01 19:00:01 -07:00
Michael H.
c169b48228 Update SBOV post 2025-10-02 02:01:26 +02:00
Michael H.
beff2fcaa9 Standing By Our Values 2025-10-02 01:44:26 +02:00
François-Xavier Talbot
9315af9b20 Only skip attaching payment method when using ctoken (#4460) 2025-09-30 18:41:17 -07:00
Prospector
4d11dc821b prospector/russia-blogpost (#4459)
* Add blog post

* Add 451 handling

* lint
2025-09-30 17:40:34 -07:00
Kevin Zheng
8fd40f46c5 Update MOTD Parser package (#4455)
* chore(package): replace motd parser package with maintained version 

Signed-off-by: Kevin Zheng <dev@sfirew.com>

* changelog

* fix import

---------

Signed-off-by: Kevin Zheng <dev@sfirew.com>
Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
2025-09-30 19:22:55 +00:00
Jerozgen
28e9f017e3 App update fixes (#4450) 2025-09-30 18:40:28 +00:00
François-Xavier Talbot
beb1bdb31f Skip synchronizing transactions to Anrok if missing payment intent ID (#4446)
* Skip succeeded txns with no payment platform ID

* chore: query cache, clippy, fmt
2025-09-30 14:36:41 +00:00
Alejandro González
895b040ad7 fix(labrinth): hide hidden orgs from user profiles (#4452)
This is a follow-up to PR #4426. I initially didn't consider the
organizations an user belongs to as worth hiding, but given that user
profiles can be public, I suppose there technically is a way to exploit
them for SEO abuse. Overall, it also seems more consistent to hide them
here too.
2025-09-30 14:30:44 +00:00
François-Xavier Talbot
54747aa628 Tweaks and fixes to background tasks (#4447)
* adjustments

* chore: query cache, clippy, fmt
2025-09-30 11:43:59 +00:00
Prospector
53c9699b46 changelog 2025-09-29 12:42:59 -07:00
Alejandro González
671fd22389 chore: cleanup unintended .sqlx folder at root of repository (#4445)
`cargo sqlx prepare` should be run in the directory of the crate that
contains the database queries instead, as that's what we're documenting
and have standarized on.
2025-09-29 18:46:39 +00:00
Josiah Glosson
bddc40e601 Readd MODRINTH_EXTERNAL_UPDATE_PROVIDER (#4444) 2025-09-29 18:17:23 +00:00
Emma Alexia
324ad65d7c Fix user deletion with new notification_deliveries table (#4437) 2025-09-29 18:04:22 +00:00
Prospector
7eace32d93 update time 2025-09-29 09:31:23 -07:00
Prospector
a5108ecc5d Update changelog 2025-09-29 09:31:07 -07:00
Josiah Glosson
a538b99c18 Reworked app update flow (#3960)
* Make theseus capable of logging messages from the `log` crate

* Move update checking entirely into JS and open a modal if an update is available

* Fix formatjs on Windows and run formatjs

* Add in the buttons and body

* Fix lint

* Show update size in modal

* Fix update not being rechecked if the update modal was directly dismissed

* Slight UI tweaks

* Fix lint

* Implement skipping the update

* Implement the Update Now button

* Implement updating at next exit

* Turn download progress into an error bar on failure

* Restore 5 minute update check instead of 30 seconds

* Fix PendingUpdateData being seen as a unit struct

* Fix lint

* Make CI also lint updater code

* feat: create AppearingProgressBar component

* feat: polish update available modal

* feat: add error handling

* Open changelog with tauri-plugin-opener

* Run intl:extract

* Update completion toasts (#3978)

* Use single LAUNCHER_USER_AGENT constant for all user agents

* Fix build on Mac

* Request the update size with HEAD instead of GET

* UI tweaks

* lint

* Fix lint

* fix: hide modal header & add "Hide update reminder" button w/ tooltip

* Run intl:extract

* fix: lint issues

* fix: merge issues

* notifications.js no longer exists

* Add metered network checking

* Add a timeout to macOS is_network_metered

* Fix tauri.conf.json

* vibe debugging

* Set a dispatch queue

* Have a popup that asks you if you'd like to disable automatic file downloads if you're on a metered network

* Move UpdateModal to modal package

* Fix lint

* Add a toggle for automatic downloads

* Fix type

Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Signed-off-by: Josiah Glosson <soujournme@gmail.com>

* Redo updating UI and experience

* lint

* fix unlistener issue

* remove unneeded translation keys

* Fix expose issue

* temp disable cranelift, tweak some messages

* change version back

* Clean up App.vue

* move toast to top right

* update reload icon

* Fixed the bug!!!!!!!!!!!!

* improve messages

* intl:extract

* Add liquid glass icon file

* not you!

* use dependency injection

* lint on apple icon

* Fix imports, move download size to button

* change update check back to 5 mins

* lint + move to providers

* intl:extract

---------

Signed-off-by: Cal H. <hendersoncal117@gmail.com>
Signed-off-by: Josiah Glosson <soujournme@gmail.com>
Co-authored-by: Calum <calum@modrinth.com>
Co-authored-by: Prospector <prospectordev@gmail.com>
Co-authored-by: Cal H. <hendersoncal117@gmail.com>
Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
2025-09-29 15:28:31 +00:00
Jerozgen
f6f66a313f "Create" modal i18n capitalization (#4441) 2025-09-29 15:23:55 +00:00
Prospector
d5f756fd86 fix withdraw button looking disabled (#4440) 2025-09-29 02:20:23 +00:00
François-Xavier Talbot
b4eba5a0d5 Tax fixes (#4435)
* Only update the PaymentMethod ID if not using placeholder ID

* comment

* Create Anrok transactions for all charges

* Fix comment

* Prefer using payment method's address rather than customer address

* chore: query cache, clippy, fmt

* Retrieve stripe address from PM

* chore: query cache, clippy, fmt

* fmt

* bring back the query cache

* Better address retrieval for updating tax amounts, always update tax_last_updated

* chore: query cache, clippy, fmt

* Don't set PM in ctoken interactive session for new PIs
2025-09-28 21:13:48 +00:00
Calum H.
d418eaee12 feat: create modal limit alerting (#4429)
* draft: layout for alert

* feat: simplify

* feat: remove dummy data

* fix: lint and widths

* feat: use chips rather than dropdown select

* feat: remove gap from admonition header v body

* Revert "feat: remove gap from admonition header v body"

This reverts commit 46cce52799bc3ac24825a73ca4add18e0acad3c1.

* fix: niche fixes

* feat: update for new backend structure

* fix: i18n
2025-09-28 19:48:21 +00:00
aecsocket
f466470d06 Hard caps on creating projects/orgs/collections (#4430)
* implement backend limits on project creation

* implement collection, org creation hard caps

* Fix limit api

* Fix clippy

* Fix limits

* Update sqlx queries

* Address PR comments on user limit structure

* sqlx prepare and clippy

* fix test maybe
2025-09-28 10:01:00 +00:00
François-Xavier Talbot
3f55711f9e More billing fixes (#4431)
* Only update the PaymentMethod ID if not using placeholder ID

* comment

* Create Anrok transactions for all charges

* Fix comment

* Prefer using payment method's address rather than customer address

* chore: query cache, clippy, fmt

* Retrieve stripe address from PM

* chore: query cache, clippy, fmt

* fmt

* bring back the query cache
2025-09-27 22:37:30 +00:00
Alejandro González
bb9ce52c9d feat(labrinth): hide orgs without a purpose, re-enable organization creation (#4426)
* chore(labrinth): set `DELPHI_URL` to a valid default in `.env.local`

* feat(labrinth): make orgs not publicly visible until they meet some conditions

* Revert "Org disabled frontend (#4424)"

This reverts commit 2492b11ec0.

* changelog: update for re-enabling organization creation

* chore: run `sqlx prepare`

* chore(labrinth): tweak tests to work with new org changes

* tweak: apply @triphora's suggestion

Co-authored-by: Emma Alexia <emma@modrinth.com>
Signed-off-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>

* tweak: document `is_visible_organization` relationship with `Project#is_searchable`

---------

Signed-off-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
Co-authored-by: Emma Alexia <emma@modrinth.com>
2025-09-26 15:42:53 +00:00
François-Xavier Talbot
14af3d0763 Billing fixes (#4422)
* Only update the PaymentMethod ID if not using placeholder ID

* comment

* Create Anrok transactions for all charges

* Fix comment

* Prefer using payment method's address rather than customer address

* chore: query cache, clippy, fmt
2025-09-26 15:39:47 +00:00
Prospector
d43451e398 update changelog 2025-09-25 19:09:53 -07:00
Prospector
2492b11ec0 Org disabled frontend (#4424) 2025-09-26 01:55:57 +00:00
François-Xavier Talbot
4228a193e9 Charge tax on products (#4361)
* Initial Anrok integration

* Query cache, fmt, clippy

* Fmt

* Use payment intent function in edit_subscription

* Attach Anrok client, use payments in index_billing

* Integrate Anrok with refunds

* Bug fixes

* More bugfixes

* Fix resubscriptions

* Medal promotion bugfixes

* Use stripe metadata constants everywhere

* Pre-fill values in products_tax_identifiers

* Cleanup billing route module

* Cleanup

* Email notification for tax charge

* Don't charge tax on users which haven't been notified of tax change

* Fix taxnotification.amount templates

* Update .env.docker-compose

* Update .env.local

* Clippy

* Fmt

* Query cache

* Periodically update tax amount on upcoming charges

* Fix queries

* Skip indexing tax amount on charges if no charges to process

* chore: query cache, clippy, fmt

* Fix a lot of things

* Remove test code

* chore: query cache, clippy, fmt

* Fix money formatting

* Fix conflicts

* Extra documentation, handle tax association properly

* Track loss in tax drift

* chore: query cache, clippy, fmt

* Add subscription.id variable

* chore: query cache, clippy, fmt

* chore: query cache, clippy, fmt
2025-09-25 11:29:29 +00:00
François-Xavier Talbot
47020f34b6 Tax compliance adjustments (#4414)
* tax compliance adjustments

* chore: query cache, clippy, fmt
2025-09-25 11:02:33 +00:00
Jerozgen
5c00cb06f1 "Submit for review" button translation (#4381)
* "Submit for review" button translation

* Fix invitation message in the code

* Run web:fix

* Run intl:extract

---------

Co-authored-by: Calum H. <contact@cal.engineer>
2025-09-25 09:31:41 +00:00
François-Xavier Talbot
e6edf07eae Fill variables for subject line (#4415) 2025-09-24 10:52:43 +00:00
Jerozgen
5d7bd3b177 Add IntelliJ project icon (#4412) 2025-09-23 19:17:02 +00:00
François-Xavier Talbot
71d63fbe17 Fix version upload for popular projects (#4410)
* Only notify users that exist

* chore: query cache, clippy, fmt
2025-09-22 15:12:17 -07:00
François-Xavier Talbot
f33efed91b Less emails per transactinos (#4406) 2025-09-22 19:40:59 +00:00
François-Xavier Talbot
d41b31c775 Fix track1099 (#4405)
* don't parse datetime

* fix import

* update comments
2025-09-22 18:08:22 +00:00
aecsocket
20281c4efc Allow users to manage their own affiliate codes (#4392)
* Allow users to manage their own affiliate codes

* Add a badge to restrict access to affiliate codes

* sqlx prepare and clippy
2025-09-22 16:54:09 +00:00
François-Xavier Talbot
afcdb1d0a1 more loggging (#4404) 2025-09-22 16:53:27 +00:00
Calum H.
f3060cd9b4 feat: email template for subscription price changes due to tax (#4386)
* feat: subscription tax change email

* feat: wording

* feat: subscription id var for support & finalize tax change email script
2025-09-22 16:36:50 +00:00
Modrinth Bot
1a1b9f54df New translations from Crowdin (main) (#4401) 2025-09-22 15:56:14 +00:00
Jerozgen
716f293e8e "Create a server" tooltip i18n fixes (#4402) 2025-09-22 15:56:06 +00:00