Commit graph

10762 commits

Author SHA1 Message Date
infinite-persistence
605a8f371d
TUS: Skip logging "423/409 concurrent upload" errors. 2021-11-23 09:30:55 +08:00
Thomas Zarebczan
a3111003a2
Add new stickers (#347) 2021-11-22 17:52:46 -05:00
saltrafael
e2c7337d11
[Report Page] Fix GitHub URL and improve strings (#340)
* Refactor

* Fix github URL and Improve strings
2021-11-22 09:32:33 -05:00
infinite-persistence
87c3dcc057
SyncFatalError: show nag instead of hard-crashing. (#331)
* SyncFatalError: show nag instead of hard-crashing.

## Issue
When sync fails, we crash the app.

## Ticket
Maybe closes 39 "Better handle both internal and web backend interruptions / downtime"

## Approach
I'm tackling this from the standpoint that (1) sync errors are not that fatal -- we'll just lost a few recent changes (2) network disconnection is the common cause.

## Changes
- If we are offline:
    - Inform user through a nag. All other status is meaningless if we are offline.
- If we are online:
    - If api is STATUS_DOWN, show the existing crash page.
    - If there is a sync error, show a nag saying settings are now potentially unsynchronized, and add a button to retry sync.
    - If there is a chunk error, nag to reload.

* Attempt to detect `status=DOWN`

Previous code resolves the status to either "ok" or "not", which makes the app unable to differentiate between the "degraded" (nag) and "down" (crash) states.
2021-11-22 09:30:43 -05:00
infinite-persistence
13cbbc8342
TUS: Detect and disallow concurrent uploads (#339) 2021-11-22 16:41:32 +08:00
infinite-persistence
2d3057d5cf
Detect concurrent uploads and stop it. 2021-11-22 16:12:11 +08:00
infinite-persistence
b6e9c7aabf
TUS: handle URL removal on 4xx errors
## Issue
The TUS client automatically removes the upload fingerprint whenever there is a 4xx error. When we try to resume later, we couldn't find the the fingerprint and ended up creating a new upload ID.

## Changes
Since we are also storing the uploadUrl ourselves, provided that to override the tus client's default behavior of restarting a new session on 4xx errors.
2021-11-22 16:12:10 +08:00
Thomas Zarebczan
352ee7bfaa
fix syntax 2021-11-19 11:30:28 -05:00
Thomas Zarebczan
95d7582f08
remove adsense 2021-11-19 10:57:55 -05:00
infinite-persistence
21cb405965
ClaimLink: skip blacklist check (#329)
## Issue
- It was checking the blacklist on every render.
- Finding opportunities to improve performance

## Changes
Since the final destination will be a dead end anyways, skip the blacklist check so that livestreams can render a bit faster when there lots of mentions.

The only downside is that a claim preview for a blacklisted item would now appear (vs. being a text previously)
2021-11-19 09:46:52 -05:00
infinite-persistence
328b60d021
Notifications: skip resolve during boot (#330)
## Issue
- Large resolve count (albeit batched) on bootup.

## Changes
- Skip the call on bootup. The same call will happen when you click the notification bell, so it's not too late to resolve at that time.
- Added `true` to `doResolveUris` to return cached results, otherwise it will keep resolving the same channels every time we enter Notifications Page.
2021-11-19 09:46:31 -05:00
infinite-persistence
6a33ed337b
Cost Info selector fixes (#328) 2021-11-19 16:31:45 +08:00
infinite-persistence
0941667150
Cost Info selector fixes
- no memo required since they are just directly accessing the store.
2021-11-19 16:01:25 +08:00
infinite-persistence
b351617d2f
Add flow 2021-11-19 16:00:06 +08:00
infinite-persistence
ff20663b8d
byId: update only if claim has new data
This was already being done for Content claims, and repeated for Channels, Collections, and other reducers.
2021-11-19 15:59:48 +08:00
infinite-persistence
7515d21510
claimsByUri: update only if changed 2021-11-19 15:59:47 +08:00
infinite-persistence
d48a7c7295
TUS: reduce chunk size from 100MB to 25MB.
The stalling behavior has changed a bit, probably with the removal of CF.

The stall difference between 10MB and 50MB is not too noticable, so picking 25MB as a start.
2021-11-19 14:40:03 +08:00
Dan Peterson
314b63705d
get active viewers even when not live (we want waiting count) (#322) 2021-11-18 18:41:43 -05:00
Dan Peterson
3269b84385
Remove claim search long poll + introduce pending state that blocks render + avoid polling status for non-owned claim (#320) 2021-11-18 14:43:39 -05:00
infinite-persistence
4a2305dca1
Notifications filter changes (#319)
## Issue
312 Save notification on back navigation, enable filter on mobile

## Changes
- Don't clear then filter when mounted and there are unread notifications.
   - We previously clear the filter because the user could be clicking the notification bell (which is showing some number) and we ended up with a blank page because of the filter.
- Allow the filter in mobile.
   - Previously, it was intentionally removed for mobile (see bd42418f). I believe it was just because we don't have the style set up for mobile. Here's my quick attempt.
2021-11-18 10:55:33 -05:00
infinite-persistence
e288833085
Fix blacklisted claims appearing in tiles
## Mistake
Tried to simplify the logic between checking Channel vs Content claim, and ended up always checking against Channel. This is correct for commentron blocklists, but not blacklists where the txid is per claim.

## Changes
- Restored original logic.
- While at it, restore the usage of `selectClaimForUri` (i.e. no need to split into 4 selectors anymore), since we've updated the reducer to prevent invalidation from things like 'confirmation' and 'is_my_output'.
2021-11-18 10:21:21 +08:00
jessopb
4cf9309ee1
facilitate admin temp files (#313) 2021-11-17 13:28:36 -05:00
infinite-persistence
e35069de1c
Cache the processing of ChannelMentionSuggestions (#309)
## Issue
One of the bottlenecks of livestream page.

The component probably needs a re-design:
- Don't perpetually mount -- only mount when activated by the user through "@". This would avoid the heavy processing entirely.
- Better way of resolving uris (too many arrays, too many loops).
- Tom also mentioned that we should not be resolving every commenter as we see encounter them in a livestream. This is currently the case because the component is always mounted.

## Changes
Until the re-design occurs, attempt to cache the heavy processing. Also, trimmed down the amount of loops.
2021-11-17 11:47:56 -05:00
infinite-persistence
47c316e0ad
Reduce livestream chat size to 50 2021-11-17 21:04:17 +08:00
infinite-persistence
75bde149cf
Fix url selectors
No memo required.
2021-11-17 19:57:04 +08:00
infinite-persistence
6382238834
Incremental livestream performance fixes (#307) 2021-11-17 18:16:52 +08:00
infinite-persistence
b69c1ec5fe
Reduce the chain of renders when Viewer Count is updated
3 layer of components were rendered because of the viewer-count update.  Only `fileViewCount` needs the value, so let it grab from redux directly.
2021-11-17 18:16:01 +08:00
infinite-persistence
01f771c6ca
Simplify makeSelectViewersForId 2021-11-17 18:16:00 +08:00
infinite-persistence
6b6879ba64
Cache subscription uris if we're gonna map it often. 2021-11-17 18:16:00 +08:00
infinite-persistence
91f1f588e6
Slice the comments before filtering to avoid going through everything.
For the case of livestreams, the comments are added incrementally via websocket. The selector returns everything, which grows as a user watches the livestream.

We could even make it a bit more efficient by passing in `maxCount` to `filterComments`, and do a `for` loop there, but decided to keep things readable by not changing the `filter` usage.
2021-11-17 18:15:59 +08:00
infinite-persistence
5204bb366e
Fix ChannelMention double-constructing the comment list.
As long as the input parameters are the same, the selector will return the cached value so that we don't construct the list twice, which involves blocklist filtering.
2021-11-17 18:15:58 +08:00
infinite-persistence
e6caa8c7ff
Don't use the obsolete selectCommentsByUri
- Same reason as d211450b.
- Also removed an unused selector.
2021-11-17 18:15:58 +08:00
Thomas Zarebczan
51546436ce
remove tag sync 2021-11-17 03:09:26 -05:00
infinite-persistence
ac93b379a9
Fix annoying hierarchy error with Yrbl
`<div>` cannot be a descendend of `<p>`, and `{subtitle}`s sometimes need to have `<div>`s.

Just switch from `<p>` to `<div>`, and let the client decide when the actual text paragraphs are.
2021-11-17 10:27:11 +08:00
Thomas Zarebczan
abbeb45d17
Update README.md 2021-11-16 10:01:52 -05:00
Thomas Zarebczan
4af72806dc
Update README.md 2021-11-16 10:01:42 -05:00
infinite-persistence
39baf1a3c9
ClaimPreviewTile state-map optimizations
## Issue
Lots of time is spent mapping the state to props for this component (since there are lots of tiles).

## Changes
Using this component as a starting point, go through the selectors and make the usual cleanup/fixes:
- Move away from the `makeSelect*` model, which creates a new selector on every call instead of actually re-using the cached version.
- Do proper caching for multi-param selectors using `re-reselect`.
- Don't cache simple functions or direct access to states.
2021-11-16 15:04:29 +08:00
infinite-persistence
201a826381
Simplify makeSelectIsUriResolving
- Memo not required. `resolvingUris` is very dynamic and is a short array anyways.
- Changeg from using `indexOf` to `includes`, which is more concise.
2021-11-16 14:32:58 +08:00
infinite-persistence
bf324a1b79
Simplify makeSelectTitleForUri
No need to memo given no transformation.
2021-11-16 12:23:18 +08:00
infinite-persistence
d03b3fd50d
Simplify selectShowMatureContent 2021-11-16 12:04:40 +08:00
infinite-persistence
8deac56e40
Fix memo: isLivestream & isLivestreamActive 2021-11-16 11:52:35 +08:00
infinite-persistence
dae0e3ccae
Use a lighter selector that doesn't re-create an array of claims.
Although selectClaimsByUri is memoized, it is often invalidated. Why create the array when all we need is the claim?
2021-11-16 10:47:59 +08:00
infinite-persistence
73f208923a
Optimize makeSelectClaimIsNsfw (and it's surrounding friends) 2021-11-16 10:14:01 +08:00
infinite-persistence
4aea0081ea
Remove duplicate claim utilities
These are already brought in from redux prior to the consolidation.
2021-11-16 08:59:07 +08:00
infinite-persistence
27dffaaf2f
Remove unused prop 2021-11-16 08:20:25 +08:00
infinite-persistence
652ec4b69b
Fix memo: makeSelectViewCountForUri, makeSelectSubCountForUri
- switch to a lighter selectClaimIdForUri
- also, these 2 don't need to memo because they are just simple accessors.
2021-11-16 08:15:24 +08:00
infinite-persistence
c8ad9718bb
Floating player position-listener fixes (#289)
## Issues
- 251 Dragging the floating player is super laggy

Recent changes and/or refactoring combined the effects or added dependancies into the effects, causing them to re-run excessively.

## Changes
- Restored effects to their original behavior.
- Don't perform the position check when dragging -- only do it when released.
- Do proper debouncing for the 'resize' listener -- the previous method was incorrect as a new function is created on each render.
2021-11-15 16:13:48 -05:00
Dan Peterson
cb104017ad
adjust livestream interval (#294) 2021-11-15 12:34:21 -06:00
Dan Peterson
0c28f3c6f1
reverse livestream status check (#293) 2021-11-15 11:52:00 -05:00
Dan Peterson
e02bc6cc03
Hotfix livestream status (#292)
* Fix livestream status on upcoming livestream

* update fix
2021-11-15 10:58:29 -05:00