Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Immutable Record for accounts in Redux state #26559

Merged
merged 14 commits into from
Nov 3, 2023

Conversation

renchap
Copy link
Sponsor Member

@renchap renchap commented Aug 20, 2023

This is inspired by #25137, but uses proper Record objects everywhere, in addition to adding types.

Related to #26555 as well

I chose to introduce two new directories, to better organize the code:

  • api_types contain the interfaces for the values returned by the Rails API. At some point, we will probably want to generate those using OpenAPI or equivalent
  • models contain the type definitions for the objects used in the Redux state, as well as any associated functions. For now, they contain a function to create a model from an API JSON

Notable changes:

  • initialState now uses the API JSON types when they are defined
  • convertState has been changed to create Record objects on keys they have corresponding models
  • Converting a JSON from the API into a Record to be used in the state is all done in one place
  • The accounts_counters reducer was merged into the accounts reducer
  • accounts reducer and associated actions has been converted into Typescript
  • relationships reduced has been converted into Typescript
  • makeGetAccount is reimplemented to return a properly typed Record, allowing consumer components to be typed correctly

TODO:

  • (maybe) add runtime checks (in dev only?) to ensure we do not have unknown fields in API responses that are dropped when creating the Record

@renchap renchap changed the base branch from i18n/manage-translations to main August 20, 2023 10:26
@renchap renchap marked this pull request as draft August 20, 2023 10:30
@renchap
Copy link
Sponsor Member Author

renchap commented Aug 20, 2023

Pushed the current state of my work.

  • Object shapes should now be correct, both for the API JSONs and the Immutable <Record>, including computing the various fields that are used. It is all moved in the model
  • accounts reducer is written in Typescript, and the actions are correctly typed. I could not use createReducer from RTK as it does not work well with an Immutable state, but it should not be hard to convert later
  • ACCOUNT_IMPORT action was not used anywhere, dropping it
  • makeGetAccount is reimplemented to return a properly typed Record. It is not yet complete as I need to convert accountsCounter and relationships to Typescript, but this should not be very hard

@renchap
Copy link
Sponsor Member Author

renchap commented Aug 21, 2023

I dropped accounts_counters entirely in my latest commit, as the only use for this reducer is to be merged back into Account in makeUserSelector, let's store those directly in Account

@punmechanic
Copy link

punmechanic commented Aug 21, 2023

One potential concern with mixing Redux Starter Kit and plain old reducers is that it's not easy to type it safely.

To type an "old-style" reducer, you need to create a discriminant union for Action:

type Action = 
  | { type: "ACTION_NAME"; payload: A[] }
  | { type: "ACTION_NAME_2"; payload: B[] }

With redux starter kit actions, you no longer have access to the string literal used to construct the action, which means you can't construct a discriminant without duplicating the name across files:

// app.ts
export const frobTheWidget = createAction('FROB_WIDGET');

// reducer.ts
type Action = 
  | { type: "FROB_WIDGET", ... }
  | { type: "ACTION_NAME"; payload: A[] }
  | { type: "ACTION_NAME_2"; payload: B[] }

Or by exporting it as a constant:

export const FROB_THE_WIDGET = "FROB_WIDGET";
export const frobTheWidget = createAction(FROB_THE_WIDGET);

You can infer the type of the action struct:

type ActionType = ReturnType<typeof frobTheWidget>

However, the typings of RSK assigns the type string to the type property - which means that the discriminant union approach in a reducer no longer works, since any string is assignable to string:

type Action = 
  | { type: "ACTION_NAME"; payload: A[] }
  | { type: "ACTION_NAME_2"; payload: B[] }
  // TypeScript infers the following to be { type: string }
  | ReturnType<typeof frobTheWidget>

function reduce(state, action: Action) {
   switch (action.type) {
      case frobTheWidget.type:
        // Type is not narrowed; this branch has access to `payload`, which has the type `A[] | B[]`.
        // This is obviously incorrect at runtime
      case "ACTION_NAME":
        // Type narrowed to { type: "ACTION_NAME"; payload: A[] } | { type: string }
        // Therefore accessing payload requires a presence check
   }
}

For the purposes of this PR, this presents in accounts_map.js, relationships.js and timelines.js as of 5352ca1; these reducers cannot be safely typed if they mix RSK actions and POJO actions. I'm not sure what the solution is here, but it'll present a problem if one tried to convert this to TypeScript at a later date.

@renchap
Copy link
Sponsor Member Author

renchap commented Aug 21, 2023

If the reducers are not converted to Typescript, you can use frobTheWidget.type like in your example.

Once they are converted to Typescript, you can use either:

  • createReducer from RTK, if the state has been converted to plain object
  • else if(fromTheWidget.match(action)) { … } if the state is still an Immutable object, like I did in this PR with reducers/account.ts

In both cases, all the actions needs to be converted to createAction, but I do not think this is a big issue?

@punmechanic
Copy link

Yes, sorry, my comments are not intended to be a criticism. When merging this code into the branch for the PR I noticed the typing issue that might occur, so I wanted to mention it.

@renchap
Copy link
Sponsor Member Author

renchap commented Aug 21, 2023

No problem, I was only wondering if you saw an issue with the approach I described 😄

I plan to have a go at converting the relationships reducer to Typescript, and all the actions it uses to createAction, before marking this PR as ready.

Also this will probably need to wait for the 4.2 release branch cutoff (hopefully next week) before being merged, we do not really want to merge such a big change just before a release.

@punmechanic
Copy link

Aligned! I'll plug away on some other component refactors :)

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@renchap
Copy link
Sponsor Member Author

renchap commented Aug 22, 2023

Relationships should now be fully typed.

I also split a few of the commits from this PR into their own PRs, to make it easier to review.

There is a type issue with using createAppAsyncThunk once a reducer starts referencing it, as it creates a circular dependency issue.

I need to check why it does this.

@github-actions
Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

@renchap renchap force-pushed the redux-account-records branch 2 times, most recently from 71cb0f7 to dcf710f Compare September 22, 2023 19:23
@renchap renchap added this pull request to the merge queue Nov 3, 2023
Merged via the queue into mastodon:main with commit 3bf2a72 Nov 3, 2023
33 checks passed
@renchap renchap deleted the redux-account-records branch November 3, 2023 15:00
renchap added a commit to renchap/mastodon that referenced this pull request Nov 4, 2023
I made a mistake in mastodon#26559 and inadvertently added a check when the reducer runs, which happens on page load.

This needs to only be checked when those specific actions are dispatched, which only happen when you are logged in.

Added a system check to ensure the UI loads when not logged in.

Fixes mastodon#27697
renchap added a commit to renchap/mastodon that referenced this pull request Nov 4, 2023
I made a mistake in mastodon#26559 and inadvertently added a check when the reducer runs, which happens on page load.

This needs to only be checked when those specific actions are dispatched, which only happen when you are logged in.

Added a system check to ensure the UI loads when not logged in.

Fixes mastodon#27697
renchap added a commit to renchap/mastodon that referenced this pull request Nov 7, 2023
audiodude pushed a commit to audiodude/mastodon that referenced this pull request Nov 16, 2023
jsgoldstein added a commit to jsgoldstein/mastodon that referenced this pull request Nov 29, 2023
* Update dependency rspec-sidekiq to v4.1.0 (mastodon#27593)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* New Crowdin Translations (automated) (mastodon#27630)

Co-authored-by: GitHub Actions <noreply@github.com>

* Add some more tests and clean up domain block controller (mastodon#27469)

* Update haml-lint line length configuration to match rubocop value (mastodon#27570)

* Rewrite `AutosuggestTextarea` as Functional Component (mastodon#27618)

* Improve Babel configuration and automatically load polyfills (mastodon#27333)

* Update strong_migrations to version 1.3.0 (mastodon#25991)

* Silence deprecation warning about secrets/credentials with Devise patch (mastodon#27578)

* Move json_ld context loaders to `config/initializers` (mastodon#27590)

* Use helpers to check environment in frontend (mastodon#27633)

* Fix inserting emojis from emoji picker fails with TypeError (mastodon#27647)

* Mark version 4.0 as no longer supported (mastodon#27627)

* Fix posts from threads received out-of-order sometimes not being inserted into timelines (mastodon#27653)

* New Crowdin Translations (automated) (mastodon#27646)

Co-authored-by: GitHub Actions <noreply@github.com>

* Archive uploaded CI assets into single file between build/test (mastodon#27668)

* Reduce CI job matrix job count (mastodon#27660)

* Use Immutable `Record` for accounts in Redux state (mastodon#26559)

* Fixes website not loading for unlogged users (mastodon#27698)

* Fix incoming status creation date not being restricted to standard ISO8601 (mastodon#27655)

* Update dependency discard to v1.3.0 (mastodon#27720)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency rubocop to v1.57.2 (mastodon#27719)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency faker to v3.2.2 (mastodon#27718)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Disable Babel polyfill injection in dev (mastodon#27691)

* Update eslint (non-major) (mastodon#27715)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update DefinitelyTyped types (non-major) (mastodon#27713)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Node.js to v20.9 (mastodon#27714)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Adjust transform origin for favorite star (mastodon#27700)

* Fix `RSpec/MetadataStyle` cop in spec/ (mastodon#27729)

* Fix `Rails/RedundantActiveRecordAllMethod` cop (mastodon#26885)

* Fix `Rails/FindEach` cop (mastodon#26886)

* Fix `Rails/BulkChangeTable` cop (mastodon#26890)

* Fix `RSpec/SpecFilePathFormat` cops (mastodon#27730)

* New Crowdin Translations (automated) (mastodon#27687)

Co-authored-by: GitHub Actions <noreply@github.com>

* Fix `RSpec/HookArgument` cop (mastodon#27747)

* Fix `Lint/EmptyBlock` cop (mastodon#27748)

* Fix `Lint/OrAssignmentToConstant` cop (mastodon#27750)

* Stub controller methods and remove `rubocop:disable` in captcha feature spec (mastodon#27743)

* Do not copy `public/packs-test` into Docker (mastodon#27736)

* Fix `RSpec/MessageSpies` cop (mastodon#27751)

* Remove false positive cop detection (mastodon#27457)

* Fix `Performance/MapMethodChain` cop (mastodon#27744)

* Fix the `notificationsUpdate` call (mastodon#27758)

* Remove unused before block from settings/branding spec (mastodon#27759)

* Use strings instead of numeric literals and remove `rubocop:disable` in cache spec (mastodon#27742)

* Consolidate JSON parsing in serializers specs (mastodon#27693)

* Add coverage for `CLI::Maintenance#fix_duplicates` command (mastodon#25252)

* Move i18n locale configuration to separate initializer (mastodon#27571)

* Move search and streaming spec manager classes to separate support files (mastodon#27727)

* Account statuses filter spec speedup (mastodon#27674)

* Add volume saving/reuse to video player (mastodon#27488)

* Change alt text to empty string for avatars (mastodon#21875)

Co-authored-by: Renaud Chaput <renchap@gmail.com>

* Update dependency strong_migrations to v1.6.4 (mastodon#27631)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency aws-sdk-s3 to v1.136.0 (mastodon#26999)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency json-schema to v4.1.1 (mastodon#26933)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency json-ld to v3.3.0 (mastodon#26762)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency sidekiq-unique-jobs to v7.1.30 (mastodon#26091)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency thor to v1.3.0 (mastodon#27464)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency json-ld-preloaded to v3.3.0 (mastodon#26763)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency selenium-webdriver to v4.15.0 (mastodon#27649)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update formatjs monorepo (mastodon#27746)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency simple_form to v5.3.0 (mastodon#27725)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency sanitize to v6.1.0 (mastodon#27723)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency react-select to v5.8.0 (mastodon#27722)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency net-http to '~> 0.4.0' (mastodon#27721)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Feature - Prevents multiple audio/video attachments from being played at the same time (mastodon#24717)

* Deduplicate yarn lock file (mastodon#27670)

* Use framework helpers instead of i-vars in controller specs (mastodon#27767)

* Fix format-dependent redirects being cached regardless of requested format (mastodon#27632)

* Upgrade to Yarn 4, remove support for Node 16 (mastodon#27073)

* Fix `Style/StabbyLambdaParentheses` cop (mastodon#27771)

* Remove unmatched `rubocop:enable` declaration (mastodon#27769)

* Simplify request cache spec shared examples (mastodon#27673)

* New Crowdin Translations (automated) (mastodon#27768)

Co-authored-by: GitHub Actions <noreply@github.com>

* Don't stub SUT in `FollowLimitValidator` spec (mastodon#27760)

* Fix `Style/WordArray` cop (mastodon#27770)

* Move RSpec config for streaming/search managers to be near classes (mastodon#27761)

* Use helper method to build batched status edits in `admin/statuses/show` (mastodon#27739)

* Using Sidekiq concurrency for default db pool value (mastodon#26488)

* Ignore block result of `send` method and remove `rubocop:disable` in deepl spec (mastodon#27741)

* Fix `RSpec/InstanceVariable` cop (mastodon#27766)

* Update dependency fog-openstack to v1 (mastodon#25968)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix `Lint/UnusedBlockArgument` cop (mastodon#27777)

* Fix `Rails/I18nLocaleTexts` cop (mastodon#27779)

* Reduce complexity in `StatusCacheHydrator` (mastodon#27783)

* New Crowdin Translations (automated) (mastodon#27787)

Co-authored-by: GitHub Actions <noreply@github.com>

* Run `yarn dedupe` when updating with Renovate (mastodon#27786)

* Update babel monorepo to v7.23.3 (mastodon#27789)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency axios to v1.6.1 (mastodon#27773)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency lint-staged to v15 (mastodon#27407)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix `RSpec/MessageChain` cop (mastodon#27776)

* Fix Web UI not displaying appropriate explanation when a user hides their follows/followers (mastodon#27791)

* Consolidate html page title output logic into helper (mastodon#27563)

* Fix Yarn version in devcontainer (mastodon#27788)

* Allow viewing and severing relationships with suspended accounts (mastodon#27667)

* Disable sidekiq unique jobs in test env (mastodon#27737)

* Minor speed improvement on `controllers/accounts` spec (mastodon#27679)

* Do not try to update an undefined video element (mastodon#27798)

* Update dependency @material-symbols/svg-600 to ^0.14.0 (mastodon#27803)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add `Api::V1::Instances::BaseController` base controller class (mastodon#27797)

* Extract crutches_active_mentions from FeedManager (mastodon#27785)

* New Crowdin Translations (automated) (mastodon#27804)

Co-authored-by: GitHub Actions <noreply@github.com>

* Speed-up in `Settings::` controllers specs (mastodon#27808)

* Change link previews to keep original URL from the status (mastodon#27312)

* Fix Jest config (mastodon#27834)

* Update dependency rails to v7.1.2 (mastodon#27812)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @rails/ujs to v7.1.2 (mastodon#27811)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* New Crowdin Translations (automated) (mastodon#27815)

Co-authored-by: GitHub Actions <noreply@github.com>

* Update formatjs monorepo (mastodon#27823)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add support for invite codes in the registration API (mastodon#27805)

* Fix modal content not being selectable (mastodon#27813)

* Update devDependencies (non-major) (mastodon#25612)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Spec coverage for `api/v1/trends` controllers (mastodon#27837)

* Add icons for private and disabled boost in web UI (mastodon#27817)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Update DefinitelyTyped types (non-major) (mastodon#27830)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update eslint (non-major) (mastodon#27831)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add `Api::V1::Statuses::BaseController` base controller class (mastodon#27794)

* Use `hash_including` to check `AccountFilter` setup in `admin/accounts` controller spec (mastodon#27838)

* Add variable delay before link verification of remote account links (mastodon#27774)

* Use `normalizes` to prepare `Webhook#events` value (mastodon#27605)

* Fix "Hide these posts from home" list setting not refreshing when switching lists (mastodon#27763)

* Remove double `subject` in api/v1/accounts/relationships spec (mastodon#27839)

* Update formatjs monorepo (mastodon#27849)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Extract private methods in api/v1/instances/domain_blocks (mastodon#27844)

* New Crowdin Translations (automated) (mastodon#27848)

Co-authored-by: GitHub Actions <noreply@github.com>

* Update Yarn to v4.0.2 (mastodon#27851)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Specs for minimal CSP policy in `Api::` controllers (mastodon#27845)

* Fix `RSpec/AnyInstance` cop (mastodon#27810)

* Add base class for `api/v1/timelines/*` controllers (mastodon#27840)

* Added Thai diacritics and tone marks in HASHTAG_INVALID_CHARS_RE (mastodon#26576)

* Update dependency webpack-bundle-analyzer to v4.10.0 (mastodon#27852)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add CodeCov for Ruby coverage reports (mastodon#23868)

* Split streaming server from web server (mastodon#24702)

* Update Yarn to v4.0.2 (mastodon#27857)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Use `Lcov` simplecov formatter on CI and `HTML` elsewhere (mastodon#27859)

* Improve codecov config (mastodon#27860)

* Update dependency axios to v1.6.2 (mastodon#27861)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix open status on media modal (mastodon#27867)

* New Crowdin Translations (automated) (mastodon#27866)

Co-authored-by: GitHub Actions <noreply@github.com>

* Add profile setup to onboarding in web UI (mastodon#27829)

* Improve spec coverage for `api/web/push_subscriptions` controller (mastodon#27858)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Add spec for well known change password endpoint (mastodon#27856)

* Add banner for forwarded reports made by remote users about remote content (mastodon#27549)

* Move controller specs for `well-known` endpoints to request specs (mastodon#27855)

* Disable simplecov `enable_coverage_for_eval` option, move to standalone file (mastodon#27869)

* Update libretranslate/libretranslate Docker tag to v1.5.2 (mastodon#27716)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency webpack-bundle-analyzer to v4.10.1 (mastodon#27885)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Reduce expectations for `RSpec/MultipleExpectations` cop in `controllers/statuses` spec (mastodon#27875)

* Reduce expectations for `RSpec/MultipleExpectations` cop in `api/v1/accounts/relationships` spec (mastodon#27879)

* Reduce expectations for `RSpec/MultipleExpectations` cop in `MoveWorker` spec (mastodon#27880)

* New Crowdin Translations (automated) (mastodon#27884)

Co-authored-by: GitHub Actions <noreply@github.com>

* Add prominent share/copy button on profiles in web UI (mastodon#27865)

* Use container queries to hide profile share button (mastodon#27889)

* Fix upper border radius of onboarding columns (mastodon#27890)

* Improve spec coverage for collection of `workers/` classes (mastodon#27874)

* Reduce expectations for `RSpec/MultipleExpectations` cop in `spec/presenters` specs (mastodon#27881)

* Update dependency react-redux-loading-bar to v5.0.5 (mastodon#27916)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency @material-symbols/svg-600 to v0.14.1 (mastodon#27907)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add spec coverage for `workers/redownload_*` worker classes (mastodon#27892)

* New Crowdin Translations (automated) (mastodon#27914)

Co-authored-by: GitHub Actions <noreply@github.com>

* Add `email_spec` and speedup/cleanup to `spec/mailers` (mastodon#27902)

* Change to single opt-in during profile setup in onboarding in web UI (mastodon#27876)

* Rewrite `/api/v1/accounts` tests as request specs (mastodon#27888)

* Rewrite `/api/v1/statuses` tests as request specs (mastodon#27891)

* Configure elastic search integration with rspec tag (mastodon#27882)

* Fixed yarn not installing node packages for streaming (mastodon#27967)

* Update devDependencies (non-major) (mastodon#27992)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency core-js to v3.33.3 (mastodon#27980)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency rubocop-rails to v2.22.2 (mastodon#27975)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* New Crowdin Translations (automated) (mastodon#27966)

Co-authored-by: GitHub Actions <noreply@github.com>

* Move api/v2/filters spec to correct path location (mastodon#27950)

* Update dependency public_suffix to v5.0.4 (mastodon#27931)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update eslint (non-major) (mastodon#27995)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Reduce `.times` usage in `lib/mastodon/cli/accounts` spec (mastodon#27944)

* Reduce `.times` usage in `StatusPin` and add `PIN_LIMIT` constant in validator (mastodon#27945)

* Reduce `.times` usage in AccountSearch spec, use constant for default limit (mastodon#27946)

* Reduce `.times` usage in `AccountStatusesCleanupPolicy` (mastodon#27947)

* Update dependency nokogiri to v1.15.5 (mastodon#27939)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Convert `api/v1/endorsements` controller spec to request spec (mastodon#27984)

* Convert `api/v1/scheduled_statuses` controller spec to request spec (mastodon#27986)

* Convert `api/v1/preferences` controller spec to request spec (mastodon#27987)

* Update actions/setup-node action to v4 (mastodon#27996)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Clean up some `Mastodon::CLI::Accounts` tests (mastodon#27473)

* Convert `api/v1/custom_emojis` controller spec to request spec (mastodon#27985)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Convert `/instances/*` controller specs to request specs (mastodon#27988)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Update babel monorepo to v7.23.4 (mastodon#28004)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add coverage for `remote_interaction_helper` (mastodon#28002)

* New Crowdin Translations (automated) (mastodon#28015)

Co-authored-by: GitHub Actions <noreply@github.com>

* Update partials for the `AdminMailer.new_trends` mailer (mastodon#28011)

* Add coverage for `settings/verifications` controller (mastodon#28001)

* Update dependency aws-sdk-s3 to v1.137.0 (mastodon#27961)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix error when muting users from Web UI (mastodon#28016)

* Add coverage for `settings/privacy` controller (mastodon#28000)

* Reduce `.times` usage in request and controller specs (mastodon#27949)

* Update dependency rspec-rails to v6.1.0 (mastodon#28017)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Convert measurement `api/v1/admin/*` controller specs to request specs (mastodon#28005)

* Update rspec fixture path config to silence deprecation warning (mastodon#28018)

* Add debug + irb gems to assist with debugging in development and tests (mastodon#27960)

* Fix unsupported time zone or locale preventing sign-up (mastodon#28035)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>

* Update dependency test-prof to v1.3.0 (mastodon#28032)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency aws-sdk-s3 to v1.138.0 (mastodon#28031)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add coverage for `api/v2/media` endpoint (mastodon#28027)

* New Crowdin Translations (automated) (mastodon#28036)

Co-authored-by: GitHub Actions <noreply@github.com>

* Update dependency aws-sdk-s3 to v1.139.0 (mastodon#28047)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Remove `default_scope` from `StatusEdit` class (mastodon#28042)

* New Crowdin Translations (automated) (mastodon#28050)

Co-authored-by: GitHub Actions <noreply@github.com>

* Consolidate configuration of `Sidekiq::Testing.fake!` setup (mastodon#28046)

* Deduplicate IDs in relationships and familiar_followers APIs (mastodon#27982)

* Update dependency @types/npmlog to v7 (mastodon#28048)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency doorkeeper to v5.6.7 (mastodon#28051)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Add missing email previews for `AdminMailer` (mastodon#28044)

* Change search popout to not list unusable search options when logged out (mastodon#27918)

* Change GIF max matrix size error to explicitly mention GIF files (mastodon#27927)

* New Crowdin Translations (automated) (mastodon#28060)

Co-authored-by: GitHub Actions <noreply@github.com>

* New Crowdin Translations (automated) (mastodon#28069)

Co-authored-by: GitHub Actions <noreply@github.com>

* Update dependency jsdom to v23 (mastodon#28075)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix not all legal images showing in file picker when uploading custom emoji (mastodon#28076)

* Update DefinitelyTyped types (non-major) (mastodon#28077)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency aws-sdk-s3 to v1.140.0 (mastodon#28080)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Remove unused `plain_mailer` layout (mastodon#28065)

* Update dependency typescript to v5.3.2 (mastodon#28078)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Clamp dates when serializing to Elasticsearch API (mastodon#28081)

* nodeinfo: add instance name and description (mastodon#28079)

* Use `admin_mailer` layout with initial salutation (mastodon#28085)

* Remove unused `cached_filtered_status_page` method from accounts controller (mastodon#28090)

* Avoid unnecessary i-var for account rss page url generation (mastodon#28092)

* New Crowdin Translations (automated) (mastodon#28096)

Co-authored-by: GitHub Actions <noreply@github.com>

* chore(deps): update dependency fabrication to v2.31.0 (mastodon#28089)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Extract `path_without_format` private methd in accounts controller (mastodon#28091)

* Ignore `@svgr/webpack` updates as they require a Webpacker upgrade (mastodon#28098)

* Dockerfile rewrite based on Ruby image with performance optimizations and size reduction, dedicated Streaming image (mastodon#26850)

Co-authored-by: “Michael <“mx@vmstan.com>
Co-authored-by: Emelia Smith <ThisIsMissEm@users.noreply.github.com>

* Fix streaming eslint configuration (mastodon#28055)

* Refactor streaming to simplify for logging change (mastodon#28056)

* Fix devcontainer by not forcing `NODE_ENV` (mastodon#28099)

* Converted app/javascript/mastodon/utils/ folder to TypeScript (mastodon#27895)

* Converted hashtag.jsx to TypeScript (mastodon#27872)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>

* Update temple to version 0.10.3 (mastodon#28086)

* Update `bcrypt` to version 3.1.20 (mastodon#28084)

* Handle scenario when webfinger response `subject` is missing host value (mastodon#28088)

* Fix incorrect apt-get install block in Dockerfile (mastodon#28112)

* Fix apt cache not being properly utilized in Dockerfile (mastodon#28115)

* Add VAPID public key to instance serializer (mastodon#28006)

Co-authored-by: Renaud Chaput <renchap@gmail.com>

* chore(deps): update dependency pghero to v3.4.0 (mastodon#28117)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Refactor, lint fix, and bug fix on admin/roles/form partial (mastodon#27558)

* Extract helper methods for labels from filters/_filter_fields (mastodon#27574)

* Extract helper methods for form label in admin/ area views (mastodon#27575)

* Move lib/mastodon/premailer_webpack_strategy to lib/ (mastodon#27636)

* Move lib/devise/* to lib/devise/strategies/* (mastodon#27638)

* Remove un-needed `action` and `template` options to `render` in controllers (mastodon#28022)

* Remove `default_scope` from `Admin::ActionLog` (mastodon#28026)

* Upgrade the node version in the vagrant file

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <noreply@github.com>
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Matt Jankowski <matt@jankowski.online>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
Co-authored-by: mogaminsk <mgmnjp@icloud.com>
Co-authored-by: zunda <zundan@gmail.com>
Co-authored-by: Aleks Xhuvani <34059898+thehydrogen@users.noreply.github.com>
Co-authored-by: Jasmin Johal <35678644+jasminjohal@users.noreply.github.com>
Co-authored-by: João Pedro Marques <64037198+TheDevJoao@users.noreply.github.com>
Co-authored-by: Jaehong Kang <sinoru@me.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
Co-authored-by: Michael Stanclift <mx@vmstan.com>
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: pajowu <pajowu@pajowu.de>
Co-authored-by: Brian Holley <brian.holley@hotmail.com>
Co-authored-by: ppnplus <54897463+ppnplus@users.noreply.github.com>
Co-authored-by: Nick Schonning <nschonni@gmail.com>
Co-authored-by: Emelia Smith <ThisIsMissEm@users.noreply.github.com>
Co-authored-by: Jeong Arm <kjwonmail@gmail.com>
Co-authored-by: Tim Campbell <timetinytim@gmail.com>
Co-authored-by: Kevin Bongart <154600+KevinBongart@users.noreply.github.com>
Co-authored-by: June <julian+github@jsts.xyz>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: “Michael <“mx@vmstan.com>
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
000hen pushed a commit to thenapnetwork/nap-mastodon that referenced this pull request Dec 6, 2023
vmstan pushed a commit to vmstan/mastodon that referenced this pull request Dec 14, 2023
vmstan pushed a commit to vmstan/mastodon that referenced this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants