Skip to content

sync: pull upstream dev (38b64b3ef) - #439

Merged
Just-Insane merged 11 commits into
integrationfrom
sync/upstream-dev-into-integration
Jun 28, 2026
Merged

sync: pull upstream dev (38b64b3ef)#439
Just-Insane merged 11 commits into
integrationfrom
sync/upstream-dev-into-integration

Conversation

@charm-cloudhub-social

@charm-cloudhub-social charm-cloudhub-social Bot commented Jun 28, 2026

Copy link
Copy Markdown

Description

Selective sync of upstream dev (SableClient/Sable, upstream HEAD 38b64b3ef) into integration.

Rather than a single all-or-nothing merge, the 9 upstream PRs since the divergence point (#943) were evaluated individually. Each was tested as an isolated cherry-pick onto integration and typechecked. Most of the original conflict noise came from two large upstream PRs (#946, #986) in areas Charm has already reworked independently — those are intentionally not merged here (see "Deferred" below).

Pulled in (this branch)

PR Summary
#1004 Fix mentions not sending in non-textual replies
#994 Context menu for copying/downloading images
#993 Fix add-account when using the hash router (uses usePathWithOrigin, preserves Charm's stopClient().finally() pattern)

tsc --noEmit and oxlint pass clean on the result.

Already present in integration (no-op — Charm implemented the equivalent independently)

  • #991 Sign-out modal → Charm already uses the same Overlay/FocusTrap dialog.
  • #995 Redaction bug → Charm already guards if (question).
  • #1001 Copy button → Charm already has MessageCopyTextItem (handles edited/redacted messages, uses Charm's icon set). Upstream's version would be a duplicate declaration.
  • #992 Preserve add-account param → Charm already declares isAddingAccount/loginUrl/registerUrl. (Cherry-pick was dropped after it produced duplicate-declaration tsc errors.)

Deferred — investigated in depth, nothing to port

Both large PRs were analyzed file-by-file against Charm's current tree. Conclusion: neither contains a fix Charm lacks.

#946 "Feat better mobile context menu" — Charm is a strict superset

Charm's ade0bcb2d imported SableClient#946 byte-for-byte (git diff 0b430d860 ade0bcb2d on Message.tsx is empty), then stacked 11 follow-up fix commits on the same surface — including fix(options): correct sticker type typo and stale Date ref, stop duplicate mobile context menus, clear long-press timer on touchcancel, and the PR #410 review series. Upstream froze SableClient#946 at merge (only later touch was SableClient#1001's copy button, already superseded). Every SableClient#946 piece — MobileOptions modal type, optional SwipeableMessageWrapper.onReply, fix_ghost_quickmenu, arbitrary-event reactions — is already in Charm. The ~342/-144 line divergence on these files is almost entirely Charm's own additions. Nothing to port.

#986 "Fix the new sidebar items" — rejected design; micro-fixes already present

  • The bulk is an oldSidebar toggle + new-sidebar restructure (SidebarNav, UserQuickTools, SettingsTab, settings.ts, Themes.tsx) — iteration on the sidebar Charm forked away from. Charm deleted SettingsTab.tsx and UserQuickTools.* and built its own. Porting would resurrect intentionally-removed files. Not applicable.
  • The genuine micro-fixes are already in Charm: RenderBody.tsx PopOut reorder (present), tab icon sizing size 300→400 + inline → isBottom ? 'inline' : 'toolbar' (present), SettingsTab "Search"→"Settings" tooltip typo (moot — file deleted in Charm).
  • Remainder (Sidebar.css.ts PUSH_Y 0→3) is trivial cosmetic tied to upstream's layout.

Recommendation: SableClient#946 and SableClient#986 can be considered resolved against this sync — no follow-up port required.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

@github-code-quality

github-code-quality Bot commented Jun 28, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: JavaScript

JavaScript / code-coverage/vitest

The overall coverage in the sync/upstream-dev-in... branch is 29%. The coverage in the integration branch is 30%.

Show a code coverage summary of the most impacted files.
File integration 58c0faf sync/upstream-dev-in... 48ff174 +/-
src/app/compone...ImageViewer.tsx 53% 45% -8%
src/app/utils/dom.ts 24% 22% -2%
src/app/feature...m/RoomInput.tsx 1% 1% 0%

Updated June 28, 2026 13:45 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

github-actions Bot and others added 5 commits June 28, 2026 11:59
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description
Fixes mentions not sending in non-textual replies, idk what else there
is to say about this

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Fixes SableClient#999

#### 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
- [x] 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. -->
Written w the assistance of having forgotten to write this part a few
months ago

(cherry picked from commit 1499b5d)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

Adds a context menu for copying and downloading images in the
`ImageViewer`. Useful for electron/tauri users.

<img width="1036" height="1086" alt="image"
src="https://github.com/user-attachments/assets/e3b07381-c76c-4bbe-8b5c-e9492bb7d10c"
/>

#### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] 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
- [x] 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).

Fueled by the rage of using sable electron.

(cherry picked from commit 38b64b3)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Fixes #556 and also fixes the cancel button in the login page having the
exact same behavior as the add account

- [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

- [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

- [ ] 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. -->

(cherry picked from commit 7c931bf)
@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

Sentry Preview Error Triage

No Sentry errors found for this PR's preview deployment as of Sun, 28 Jun 2026 13:42:14 GMT.

This comment updates automatically after each push.

Comment thread src/app/features/room/RoomInput.tsx Fixed
@Just-Insane
Just-Insane marked this pull request as ready for review June 28, 2026 13:09
Comment thread src/app/utils/dom.ts Outdated
Comment thread src/app/features/room/RoomInput.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f94179d8d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/app/components/image-viewer/ImageViewer.tsx
Comment thread src/app/features/room/RoomInput.tsx Outdated
@Just-Insane
Just-Insane enabled auto-merge June 28, 2026 13:26
Comment thread src/app/features/room/RoomInput.tsx
Comment thread src/app/utils/dom.ts Outdated
@github-actions

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-439-charm.justin-tech.workers.dev 9763020 pr-439 Sun, 28 Jun 2026 13:44:11 GMT

@Just-Insane
Just-Insane merged commit ac65e64 into integration Jun 28, 2026
19 checks passed
@Just-Insane
Just-Insane deleted the sync/upstream-dev-into-integration branch June 28, 2026 13:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48ff174c4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


return getMentionContent(
[replyDraft.userId],
roomMention || replyEvent?.getContent()['m.mentions']?.room === true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't inherit @room mentions from replies

When a user replies to a message that already had m.mentions.room === true, this copies that flag into the new event even if the new text/upload/sticker does not mention @room. Since Matrix room-mention notifications are driven by the new event's content.m.mentions.room, any non-silent reply from a user with room-notify power will ping the whole room unexpectedly; only the current event's explicit roomMention should set this flag.

Useful? React with 👍 / 👎.

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.

3 participants