Skip to content

Upstream: Quick Search Palette, Collapsible Categories, Bugfixes#70

Merged
yutotakano merged 188 commits intocompsoc-edinburgh:masterfrom
yutotakano:upstream-integration
Nov 26, 2025
Merged

Upstream: Quick Search Palette, Collapsible Categories, Bugfixes#70
yutotakano merged 188 commits intocompsoc-edinburgh:masterfrom
yutotakano:upstream-integration

Conversation

@yutotakano
Copy link
Member

This PR contains upstream changes between 2025/10/22 and 2025/11/26.

The specific range is (0c02b3f, 33e6618], where 0c02b3f was the last commit that was merged into BI File Collection as part of #66.

Exhaustive List of Changes

New Features

Bug fixes

Chores

The following commits are also included, but are not relevant to us

I listt them here so that it serves as an exhaustive description of all commits that the PR contains when doing git blame etc in the future.

DB Model Changes

  • documents: Add an integer field order on DocumentFile

Merge

I've done a manual merge with our repo. UTs pass and the frontend looks fine. None of the DB model changes affect any of our open PRs.

Thus, if the CI passes, I will merge with full responsibility.

SIP Renovate Bot and others added 30 commits April 19, 2025 05:05
update make-feedback-button-more-clear with master
Collapsible categories and subcategories

See merge request vseth/sip-com-apps/community-solutions!556
Replace all usage of moment.js with date-fns, cutting ~60kB from bundle size

See merge request vseth/sip-com-apps/community-solutions!543
- Redirects away unauthorised users
- Renamed some props to accurately reflect their intent/behaviour
- Handles /exams/:filename/404 URLs explicitly too, since by default nested
  Switches don't use the top-level 404 route.
Create a separate route for exam edit page

See merge request vseth/sip-com-apps/community-solutions!544
The double shadow looks kinda ugly. This is probably not intentional,
because the <Paper> component by default shouldn't have shadows.

It's only because a separate Paper component in a distant parent of
<Editor> is changing the shadow value of all children.
Issue: mantinedev/mantine#4930
…ent-like box

This is more natural UI to convey that comments are collapsed.
It also helps when adding a new comment on a collapsed thread,
because previously you had no indicator that there were unseen
comments that were being replied to. Now, it is visible that
there are collapsed comments above your new comment.
Update dependency date-fns to v4

See merge request vseth/sip-com-apps/community-solutions!517
Better commenting UX

Closes #326

See merge request vseth/sip-com-apps/community-solutions!521
yutotakano and others added 25 commits November 14, 2025 16:33
Refactor away custom Route to a wrapper component instead

See merge request vseth/sip-com-apps/community-solutions!541
Revert "Merge branch 'remove-userroutes' into 'master'"

See merge request vseth/sip-com-apps/community-solutions!578
Reduce re-renders in Quick Search Box

See merge request vseth/sip-com-apps/community-solutions!580
…ches

Frontend entered an infinite loop in MarkdownText.addMarks when PostgreSQL
decides to return search results from ts_query but doesn't highlight them
when requesting ts_headline with the same query. This seems to happen on
staging/prod databases and could not be replicated locally even when all
data was copied, which leads me to believe it's a locale issue (my laptop
is en_US for reference).

When answer/comment.highlighted_words from the backend is an empty array,
it gets passed as `addMarks(obj, new RegExp([].join("|")))`. The RegExp
instance matches all inputs if constructed with an empty string. This
results in the `while` loop within addMarks to never terminate.

This never happened on the old search page (and only happens on QuickSearch)
since the old search page uses a wrapper component `HighlightedMarkdown`
that checks for this exact case.

We fix the problem in two layers:
- When passing props to MarkdownText, QuickSearchResults checks if the
  array is empty and sets the regex prop to `undefined` instead
- Inside addMarks, if anyone accidentally does the same mistake in the
  future, we check if the RegExp is an empty match-all and return early.
This prevents any mis-use of MarkdownText directly in the future which
can lead to bugs like #386, caused by passing bad regex.

By limiting the scope of use to only highlighting an array of strings,
(AND checking whether the array is empty and acting accordingly), we
limit the blast radius for future developers.
Fix browser freezing when PostgreSQL decides not to highlight any matches

Closes #386

See merge request vseth/sip-com-apps/community-solutions!581
Solves the issue with two LoadingOverlay being laid on top of each other
(one from HomePage while categories load, one from UserRouteContent while
auth loads).

Using a non-intrusive loader that doesn't cover the page also paves way
for caching the categories and subtly hydrating them once the server responds.
This speeds up the loading of the homepage for returning users and users
who are navigating from a different page, since the cached category data
will show up immediately after the auth check.

Perceived loading times are important to optimize, since the several
hundred milliseconds of delay can deter away users.

The local storage cache totals to about 25-35 kB assuming UTF-8, and
double assuming UTF-16 (I read somewhere that JavaScript may use UTF-16).
This is pretty small in the grand scheme of things (browser limit is 5
or 10 Mb, our prod bundle size is 2 Mb, etc). Still, the user can safely
disable local storage via their browser preferences and it won't impact
the site's functionality -- the cache is only for performance optimization.
Cache the home-page locally, reducing perceived load time

See merge request vseth/sip-com-apps/community-solutions!545
@yutotakano yutotakano self-assigned this Nov 26, 2025
@yutotakano yutotakano merged commit 08ac8ee into compsoc-edinburgh:master Nov 26, 2025
5 checks passed
@yutotakano yutotakano deleted the upstream-integration branch November 26, 2025 12:12
@yutotakano yutotakano mentioned this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants