<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->
### Description
Fixes the rerender cycle by making it sure it redoes the math if the
state changes instead
It doesn't have or need a changelog as it is a bug encountered only in
the dev branch
Fixes #
#### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
### Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
### AI disclosure:
- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
The callas disregard for the state of the room compelled and educated in
writing the pr 😔😔😔
Closes#701
The hook hands the renderer a `willRenderDayDivider` / `willRenderNewDivider`
flag attached to the FIRST event of a new day (or the readUptoEventId
boundary). The render layer in RoomTimeline always emitted those dividers
even when `useTimelineEventRenderer` returned `null` for the event itself
— for example when `hideMembershipEvents` / `hideNickAvatarEvents` /
`hideMemberInReadOnly` filtered the underlying event out at render time.
Result: announcement channels and similar rooms whose only events on a
given day are hidden (joins/leaves/profile changes) showed a bare day
divider with no message under it. Same orphan pattern produced the
"dates showing without content" complaint in #701.
Fix: gate the dividers JSX on `renderedEvent !== null`. When the event
renders null, the dividers are skipped too. When at least one event of
a day passes the renderer, the divider is attached to it the same way
as before.
Edge case: a day where the first hook-eligible event is rendered as null
but a later event renders correctly will lose the day divider entirely.
That is strictly better than an orphan divider in the symptom case the
issue reports, and the proper fix (propagate the divider forward in
useProcessedTimeline based on render prediction) is a larger refactor
that can land separately.
### Description
This pull request updates the plain text conversion logic to better
handle spoilered text, ensuring that spoiler formatting is replaced with
`[Spoiler]` in plain text fallbacks as per
[MSC4454](https://github.com/matrix-org/matrix-spec-proposals/pull/4454).
**Spoiler handling improvements:**
- Spoilered text (delimited by `||`) is now replaced with `[Spoiler]` in
the plain text output, matching the MSC4454 specification.
#### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
### Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
### AI disclosure:
- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
No AI involved
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->
### Description
Migrates from eslint and prettier to oxlint and oxfmt + some rule
hardening and - some rules that don't exist in oxlint, but I decided it
probably wasn't worth running both in parallel just for a few rules.
Notably, got rid of many "as any"s and swapped to .toSorted() for safer
stuff and "type" in imports. Added comments to all the existing lint
issues (console logging and the alert for app updates) and the few
places "as any" was justified (test cases) and some message object
whatnots.
Also notably, fmt now takes a second or two, and linting now takes no
more than a few seconds. Yay!
Recommended vscode plugins, workflows, and configs should all be updated
assuming I didn't miss anything.
<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->
#### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change - breaking I guess since not all rules exist? I
don't really know exactly what I uh... didn't include.
- [ ] This change requires a documentation update
### Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
### AI disclosure:
- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
I deployed a swarm of silly AIs to fix many of the simpler as any casts
and subsequent typechecks because there were hundreds and I'm not doing
that manually :p. I did review it, mostly just seamless swapping to the
correct cast type instead of as any, nothing particularly complicated.