Skip to content

Fuselage 0.58→0.78 migration + telephony settings + UI polish - #3349

Merged
jeanfbrito merged 15 commits into
masterfrom
polish-downloads
Jun 10, 2026
Merged

jeanfbrito merged 15 commits into
masterfrom
polish-downloads

Conversation

@jeanfbrito

@jeanfbrito jeanfbrito commented May 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Migrates the desktop UI from Fuselage 0.58 to 0.78 (hop-by-hop), adds the telephony preferred-server / deep-linking feature, and polishes the Settings, Certificates, Downloads, About and Log Viewer screens to current design-system conventions.

Dependencies

  • chore(deps): Fuselage 0.58 → 0.62 → 0.66 → 0.70 → 0.74 → 0.78 (hop-by-hop; Modal compound API → named exports, MenuV2 → Menu)
  • fix(deps): bump fuselage-hooks 0.33→0.41 + css-in-js 0.31→0.32 for Fuselage 0.78

Features

  • feat: telephony preferred-server settings UI
  • feat: telephony deep linking for tel: and callto: URLs
  • feat: support sha-prefixed exception versions by git commit hash

UI polish (Fuselage 0.78 conformance)

  • Settings: fixed Select right-edge alignment (numeric width={220} is ignored by the inline-flex Select), extracted a shared SettingField for the label+hint/control rows, centered the General tab in a 600px column, and migrated to 0.78 token names.
  • Certificates: centered the tables in a 600px column; added row-hover highlight (dropped striped so hover shows on every row).
  • Downloads: aligned DownloadsManagerView with Fuselage 0.78 (tokens, Field wrappers, Button/ButtonGroup, empty/no-results states), added row hover, and fixed pagination so it resets when a filter shrinks the result set (was rendering a blank page past the end).
  • About: made the update-channel select theme-correct (it can't use Fuselage Select because the dialog is a native showModal() top-layer element that the Select dropdown portals behind — documented in docs/KNOWN_ISSUES.md).
  • Log Viewer: replaced a styled <div> badge with <Box> semantic props.

Build

Verification

  • tsc --noEmit and yarn lint clean across all touched files.
  • Fuselage-craft design-system gate run per-screen (type + lint gates pass); remaining advisory warnings are toolbar require-field-wrapper false-positives (controls already carry aria-label).

Summary by CodeRabbit

  • Chores

    • Updated Rocket.Chat UI library dependency versions
  • Bug Fixes

    • Prevented empty-page rendering after filtering by resetting pagination
    • Fixed downloads empty-state vs no-results messaging distinctions
  • Documentation

    • Added known-issue entry about dropdown portal affecting row hover/focus highlighting (with workaround)
  • Style

    • Modernized component styling and spacing across settings, dialogs, downloads, and managers
  • Localization

    • Added/expanded downloads UI translations for many locales

jeanfbrito added 14 commits May 27, 2026 19:00
…selage 0.78

Fuselage 0.78's Scrollable calls useStableCallback from fuselage-hooks,
which only exists in hooks 0.41+. The stale 0.33.1 pin caused a runtime
TypeError (useStableCallback is not a function) crashing the renderer at
startup. css-in-js bumped to satisfy fuselage's ^0.32.0 requirement.

The type gate passed because tsc compiled against the old hooks types;
the missing export only surfaces at runtime symbol resolution.
- Replace invalid color tokens (danger-500, neutral-600) with semantic
  ones (danger, hint) — passes fuselage-gate valid-color-token rule.
- Swap deprecated SelectLegacy×3 for Select with Key handler.
- Wrap SearchInput + Selects in Field/FieldRow with aria-label for a11y.
- Replace hand-rolled <a href="#"> ActionButton with real <Button small
  secondary>; group row actions inside <ButtonGroup small>.
- Convert numeric px spacing to x* tokens; switch to logical props
  (pi/pbs/pbe/mis/mie). Tighten filter row, list padding, and item
  rhythm; narrow filename column for better progress room.
- Replace neutral-600 in FileIcon; mbs={-20} → mbs='neg-x20'.
- Add States-based empty + no-results screens with new i18n keys
  (downloads.empty.*, downloads.noResults.*).
The General-tab Select rows were sized by a numeric `width={220}` prop,
which Fuselage's inline-flex Select ignores — the controls fell back to
content width and their right edges never lined up. Wrap each control in
a fixed `width='x220'` flex box so the Select/InputBox fills it, giving
all rows a single aligned right edge.

Extract the repeated label+hint / control two-column scaffold into a
SettingField component so alignment, column widths and the optical
`paddingBlockStart='x4'` nudge live in one place and can't drift per row.

Keep the Outlook interval input narrow (maxWidth='x80', matching the
prior 5rem) but right-justified so its edge still aligns with the
selects, and add breathing room above the Clear Screen Capture button.
Make it easy to see which row the pointer is on in the certificate
tables and the downloads list.

- Certificates: mark each data row with TableRow `action` so Fuselage
  applies its built-in surface-hover background, and drop `striped`
  from both tables — the zebra rule outranked the hover rule on even
  rows, so hover only showed on odd rows.
- Downloads: each item row gets a surface-hover background on :hover via
  css-in-js (token-driven, theme-safe), with rounded corners and a
  short transition.
The certificate tables stretched the full window width, leaving the
Remove buttons stranded far from the domains. Wrap them in the same
centered 600px form column the Settings General tab uses, so the
content lines up with the rest of the settings UI.
- GeneralTab: wrap the FieldGroup in a centered 600px form column so the
  rows line up with the rest of the settings UI instead of stretching
  the full window width.
- SettingsView header: replace numeric padding with logical spacing
  tokens (pi/pbs/pbe), center-align the title row, and space the back
  button with mie.
- DeveloperTab: use the 0.78 token names (mbe='x16', color='default').
- TelephonyServer / OutlookCalendarSyncInterval: accept and forward a
  className so they match the other SettingField-based rows.
- Document the modern Select portal/focus constraint in KNOWN_ISSUES
  (open dropdown moves focus + hover surface outside the parent row).
On a deep page, narrowing a filter (or removing/cancelling downloads)
shrank the result set below the current offset, so the slice fell past
the end and the list rendered blank while the pagination footer still
claimed "showing X-Y of Z". Snap the offset back to the first page
whenever it lands outside the filtered results.
The update-channel picker was a raw <select> with hardcoded hex colors,
px dimensions and a baked-in white background, so it ignored the dark
theme and failed the design-system gate.

Fuselage's modern Select can't be used here: the About panel renders in
a native <dialog> opened with showModal() (top layer), and Select
portals its dropdown to document.body — behind the dialog. So keep a
native select, but:

- render it via <Box is='select'> so the css-in-js class actually
  attaches and resolves
- style it with global --rcx-color-* palette tokens (surface-tint,
  font-default, stroke-light/highlight) so it tracks light/dark/
  high-contrast
- replace the data-URI chevron (currentColor rendered black in dark
  mode) with an overlaid Fuselage <Icon name='chevron-down'>
- center the FieldLabel against the control

The portal/top-layer constraint is documented in docs/KNOWN_ISSUES.md.
The "N entries" overlay badge was a raw <div> with inline-style literal
dimensions (fontSize 12px, padding 4px 8px, border-radius 4px), failing
the design-system gate. Render it as a <Box> with semantic props
(fontScale='c1', pi/pb, borderRadius='x4', inset/position/zIndex, bg and
color tokens) so it resolves from Fuselage and themes correctly.
@coderabbitai

coderabbitai Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 813b5782-c090-44de-8903-2f78435eafff

📥 Commits

Reviewing files that changed from the base of the PR and between 19643a6 and abbef41.

📒 Files selected for processing (15)
  • src/i18n/de-DE.i18n.json
  • src/i18n/es.i18n.json
  • src/i18n/fi.i18n.json
  • src/i18n/fr.i18n.json
  • src/i18n/hu.i18n.json
  • src/i18n/ja.i18n.json
  • src/i18n/no.i18n.json
  • src/i18n/pl.i18n.json
  • src/i18n/pt-BR.i18n.json
  • src/i18n/ru.i18n.json
  • src/i18n/sv.i18n.json
  • src/i18n/tr-TR.i18n.json
  • src/i18n/uk-UA.i18n.json
  • src/i18n/zh-CN.i18n.json
  • src/i18n/zh-TW.i18n.json
✅ Files skipped from review due to trivial changes (6)
  • src/i18n/ja.i18n.json
  • src/i18n/pl.i18n.json
  • src/i18n/hu.i18n.json
  • src/i18n/ru.i18n.json
  • src/i18n/pt-BR.i18n.json
  • src/i18n/sv.i18n.json
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: check (ubuntu-latest)
  • GitHub Check: check (windows-latest)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Ram-sah19
Repo: RocketChat/Rocket.Chat.Electron PR: 3254
File: .github/workflows/build-release.yml:80-94
Timestamp: 2026-03-11T06:38:40.426Z
Learning: In the RocketChat/Rocket.Chat.Electron repository, the issues flagged in `.github/workflows/build-release.yml` (e.g., `node12` runtime in the release action and missing `snapcraft_token` input), i18n files, and `electron-builder.json` are pre-existing in the `develop` branch and are pulled in during merge conflict resolution. Do not flag these as new issues introduced by PRs that only modify `src/injected.ts` and `src/ui/main/rootWindow.ts`.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-27T22:00:28.720Z
Learning: Applies to **/*.{tsx,ts} : MANDATORY: Use Fuselage components for all UI work. Only create custom components when Fuselage doesn't provide what's needed
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-27T22:00:28.720Z
Learning: Applies to **/*.{tsx,ts} : Import UI components from `rocket.chat/fuselage` and check `Theme.d.ts` for valid color tokens
🔇 Additional comments (9)
src/i18n/de-DE.i18n.json (1)

188-196: LGTM!

src/i18n/es.i18n.json (1)

207-215: LGTM!

src/i18n/fi.i18n.json (1)

195-203: LGTM!

src/i18n/fr.i18n.json (1)

195-203: LGTM!

src/i18n/no.i18n.json (1)

223-231: LGTM!

src/i18n/tr-TR.i18n.json (1)

113-122: LGTM!

src/i18n/uk-UA.i18n.json (1)

95-104: LGTM!

src/i18n/zh-CN.i18n.json (1)

146-154: LGTM!

src/i18n/zh-TW.i18n.json (1)

92-101: LGTM!


Walkthrough

Upgrade Fuselage and migrate UI components to modern named imports and tokenized spacing; add a shared SettingField, switch Downloads and AboutDialog selects to the modern Select, update dialogs/menus, adjust downloads i18n, and document a known Select portal hover/focus issue.

Changes

Fuselage Component Modernization

Layer / File(s) Summary
Dependency upgrade and known issues
package.json, docs/KNOWN_ISSUES.md
Bumped @rocket.chat/fuselage, @rocket.chat/css-in-js, and @rocket.chat/fuselage-hooks; added KNOWN_ISSUES entry describing Select portal focus/hover behavior.
Modal and menu component API migration
src/ui/components/SupportedVersionDialog/index.tsx, src/ui/components/SideBar/index.tsx
Refactored modal/menu JSX to use named Fuselage imports (ModalHeader, ModalTitle, Menu, etc.) instead of dot-notation and MenuV2.
Select modernization, downloads view, and i18n
src/ui/components/DownloadsManagerView/index.tsx, src/i18n/*
Replaced SelectLegacy with Select, updated change handlers to accept Key and persist strings, added hasActiveFilters and pagination reset effect, and added localized downloads.empty/downloads.noResults strings across locales.
About dialog select refactoring
src/ui/components/AboutDialog/index.tsx
Replaced native select with Fuselage-based Field/FieldRow layout, introduced CSS-in-JS classes, generated stable id via useId(), and added chevron Icon.
SettingField shared component
src/ui/components/SettingsView/features/SettingField.tsx
Added exported SettingField to standardize settings-row layout (label+hint column with a right-side control area).
Settings components adoption
src/ui/components/SettingsView/features/*
Refactored AvailableBrowsers, ThemeAppearance, TelephonyServer, and OutlookCalendarSyncInterval to use SettingField, generate stable ids, and remove duplicate layout code; some components now accept optional className props.
Settings view layout standardization
src/ui/components/SettingsView/*
Updated SettingsView, GeneralTab, DeveloperTab, and related features to use Fuselage tokenized spacing props and explicit alignment values.
Downloads list UI components
src/ui/components/DownloadsManagerView/ActionButton.tsx, DownloadItem.tsx, FileIcon.tsx
Converted ActionButton to Fuselage Button, reorganized DownloadItem using ButtonGroup and tokenized spacing, and updated FileIcon tokens and color.
Certificates table and log viewer
src/ui/components/CertificatesManager/*, src/logViewerWindow/logViewerWindow.tsx
Enabled action rows in CertificateItem, refactored CertificatesManager layout and removed striped table styling, and migrated log viewer overlay to a tokenized Box.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: Fuselage dependency upgrade (0.58→0.78), telephony settings feature, and general UI polish across multiple components.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/ui/components/DownloadsManagerView/index.tsx`:
- Line 17: The Select onChange handlers in DownloadsManagerView currently type
their event/value imprecisely (importing ChangeEvent/Key); update the handler
signatures to accept (value: string) since all Select options are string pairs
and DownloadStatus is a string union, then call the existing setters (e.g.,
setStatusFilter, setXFilter) with that string directly. Remove the unused
ChangeEvent/Key imports and adjust any handler references (e.g.,
handleStatusChange, handleXYZChange) to use the (value: string) parameter so the
selected-value type matches the options and eliminates the precision-loss
concern.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2f247c28-c7a0-4945-8891-f7e2c0101f13

📥 Commits

Reviewing files that changed from the base of the PR and between 3c89e81 and 19643a6.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (22)
  • docs/KNOWN_ISSUES.md
  • package.json
  • src/i18n/en.i18n.json
  • src/logViewerWindow/logViewerWindow.tsx
  • src/ui/components/AboutDialog/index.tsx
  • src/ui/components/CertificatesManager/CertificateItem.tsx
  • src/ui/components/CertificatesManager/CertificatesManager.tsx
  • src/ui/components/DownloadsManagerView/ActionButton.tsx
  • src/ui/components/DownloadsManagerView/DownloadItem.tsx
  • src/ui/components/DownloadsManagerView/FileIcon.tsx
  • src/ui/components/DownloadsManagerView/index.tsx
  • src/ui/components/SettingsView/DeveloperTab.tsx
  • src/ui/components/SettingsView/GeneralTab.tsx
  • src/ui/components/SettingsView/SettingsView.tsx
  • src/ui/components/SettingsView/features/AvailableBrowsers.tsx
  • src/ui/components/SettingsView/features/ClearPermittedScreenCaptureServers.tsx
  • src/ui/components/SettingsView/features/OutlookCalendarSyncInterval.tsx
  • src/ui/components/SettingsView/features/SettingField.tsx
  • src/ui/components/SettingsView/features/TelephonyServer.tsx
  • src/ui/components/SettingsView/features/ThemeAppearance.tsx
  • src/ui/components/SideBar/index.tsx
  • src/ui/components/SupportedVersionDialog/index.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: check (ubuntu-latest)
  • GitHub Check: check (windows-latest)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{tsx,ts}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{tsx,ts}: MANDATORY: Use Fuselage components for all UI work. Only create custom components when Fuselage doesn't provide what's needed
Import UI components from @rocket.chat/fuselage and check Theme.d.ts for valid color tokens
Use React functional components with hooks
Use PascalCase for component file names

Files:

  • src/ui/components/SettingsView/DeveloperTab.tsx
  • src/ui/components/CertificatesManager/CertificateItem.tsx
  • src/ui/components/SettingsView/features/ClearPermittedScreenCaptureServers.tsx
  • src/ui/components/CertificatesManager/CertificatesManager.tsx
  • src/ui/components/DownloadsManagerView/ActionButton.tsx
  • src/ui/components/SettingsView/features/AvailableBrowsers.tsx
  • src/ui/components/DownloadsManagerView/FileIcon.tsx
  • src/ui/components/SettingsView/GeneralTab.tsx
  • src/ui/components/SettingsView/features/ThemeAppearance.tsx
  • src/ui/components/SettingsView/SettingsView.tsx
  • src/ui/components/SettingsView/features/SettingField.tsx
  • src/ui/components/DownloadsManagerView/DownloadItem.tsx
  • src/logViewerWindow/logViewerWindow.tsx
  • src/ui/components/DownloadsManagerView/index.tsx
  • src/ui/components/SettingsView/features/TelephonyServer.tsx
  • src/ui/components/SupportedVersionDialog/index.tsx
  • src/ui/components/AboutDialog/index.tsx
  • src/ui/components/SideBar/index.tsx
  • src/ui/components/SettingsView/features/OutlookCalendarSyncInterval.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Redux actions must follow FSA (Flux Standard Action) pattern
Avoid unnecessary comments — write self-documenting code through clear naming
Always verify libraries by checking official docs and .d.ts files in node_modules/. Never assume props, tokens, or APIs work without verification
Avoid subjective descriptors ('smart', 'excellent', 'dumb') in documentation and comments
Use measurable descriptions in code documentation: 'reduced memory usage', 'improved by X%' instead of subjective claims
NEVER invent metrics — don't include estimated time spent or speculated user counts. Only include numbers from actual logs, error messages, or documented sources

Files:

  • src/ui/components/SettingsView/DeveloperTab.tsx
  • src/ui/components/CertificatesManager/CertificateItem.tsx
  • src/ui/components/SettingsView/features/ClearPermittedScreenCaptureServers.tsx
  • src/ui/components/CertificatesManager/CertificatesManager.tsx
  • src/ui/components/DownloadsManagerView/ActionButton.tsx
  • src/ui/components/SettingsView/features/AvailableBrowsers.tsx
  • src/ui/components/DownloadsManagerView/FileIcon.tsx
  • src/ui/components/SettingsView/GeneralTab.tsx
  • src/ui/components/SettingsView/features/ThemeAppearance.tsx
  • src/ui/components/SettingsView/SettingsView.tsx
  • src/ui/components/SettingsView/features/SettingField.tsx
  • src/ui/components/DownloadsManagerView/DownloadItem.tsx
  • src/logViewerWindow/logViewerWindow.tsx
  • src/ui/components/DownloadsManagerView/index.tsx
  • src/ui/components/SettingsView/features/TelephonyServer.tsx
  • src/ui/components/SupportedVersionDialog/index.tsx
  • src/ui/components/AboutDialog/index.tsx
  • src/ui/components/SideBar/index.tsx
  • src/ui/components/SettingsView/features/OutlookCalendarSyncInterval.tsx
🔇 Additional comments (29)
docs/KNOWN_ISSUES.md (1)

1-20: LGTM!

src/ui/components/CertificatesManager/CertificatesManager.tsx (1)

27-66: LGTM!

src/ui/components/AboutDialog/index.tsx (2)

37-80: LGTM!


213-242: LGTM!

package.json (1)

60-63: ⚡ Quick win

Confirm npm releases + migration coverage for the Rocket.Chat deps bump.

  • npm contains @rocket.chat/[email protected] (also 0.78.1), @rocket.chat/[email protected], and @rocket.chat/[email protected].
  • Please ensure the PR covers all breaking-change/migration requirements for upgrading @rocket.chat/fuselage to 0.78.0 (beyond just compiling/linting).
src/ui/components/CertificatesManager/CertificateItem.tsx (1)

20-20: ⚡ Quick win

Confirm action is a valid TableRow prop in @rocket.chat/[email protected].

CertificateItem.tsx uses <TableRow key={url} action>, but public docs/search didn’t surface a matching TableRow action prop contract, and @rocket.chat/fuselage typings aren’t available in this sandbox. Check the installed package’s TypeScript definitions for TableRow/TableRowProps to confirm action exists (or remove/replace it if it doesn’t).

src/logViewerWindow/logViewerWindow.tsx (1)

929-944: ⚡ Quick win

Validate Box bg='tint' token (count badge)
In src/logViewerWindow/logViewerWindow.tsx (lines 929-944), the overlay badge uses bg='tint', while the rest of this file uses backgroundColor='surface-tint' / 'surface-light'. Ensure tint is a valid Fuselage Box background token in Theme.d.ts; otherwise align to the existing surface-tint usage (e.g., bg='surface-tint' or backgroundColor='surface-tint') so the badge background isn’t dropped.

src/i18n/en.i18n.json (1)

223-231: LGTM!

src/ui/components/DownloadsManagerView/index.tsx (5)

154-158: LGTM!


185-192: LGTM!


211-227: LGTM!


228-278: LGTM!


280-306: LGTM!

src/ui/components/DownloadsManagerView/ActionButton.tsx (1)

1-10: LGTM!

src/ui/components/DownloadsManagerView/DownloadItem.tsx (3)

125-130: LGTM!


116-154: LGTM!


187-238: ⚡ Quick win

Remove the danger-prop concern: Fuselage Button supports danger and ActionButton forwards it.
ActionButton is typed as ComponentProps<typeof Button> and spreads its props into <Button ... />, and Fuselage Button exposes danger?: boolean (v0.78.0).

src/ui/components/DownloadsManagerView/FileIcon.tsx (1)

25-35: LGTM!

src/ui/components/SupportedVersionDialog/index.tsx (1)

1-13: LGTM!

Also applies to: 172-192

src/ui/components/SideBar/index.tsx (1)

5-5: LGTM!

Also applies to: 144-159

src/ui/components/SettingsView/features/AvailableBrowsers.tsx (1)

67-83: LGTM!

src/ui/components/SettingsView/features/ThemeAppearance.tsx (1)

52-66: LGTM!

src/ui/components/SettingsView/features/TelephonyServer.tsx (1)

13-66: LGTM!

src/ui/components/SettingsView/features/OutlookCalendarSyncInterval.tsx (1)

13-64: LGTM!

src/ui/components/SettingsView/SettingsView.tsx (1)

56-70: LGTM!

src/ui/components/SettingsView/GeneralTab.tsx (1)

21-44: LGTM!

src/ui/components/SettingsView/DeveloperTab.tsx (1)

14-14: 💤 Low value

Can’t confirm color='default' token for Fuselage 0.78 in this repo snapshot

The attempted lookup of Theme.d.ts under node_modules/@rocket.chat/fuselage fails because that path isn’t present here, so color='default' can’t be proven to be a valid typography/font color token. Locate the actual Theme.d.ts used by this project and confirm default is an allowed value for the color prop (otherwise use the existing correct token).

src/ui/components/SettingsView/features/SettingField.tsx (1)

37-46: 💤 Low value

Ensure the Select/InputBox still fills the fixed x220 slot after removing explicit width

In src/ui/components/SettingsView/features/SettingField.tsx the right slot is <Box width='x220' justifyContent='flex-end'>; with consumer widths removed, this relies on @rocket.chat/fuselage Select/InputBox defaulting to full width. If they don’t, the controls can render narrower/right-aligned within the x220 container.

src/ui/components/SettingsView/features/ClearPermittedScreenCaptureServers.tsx (1)

17-17: LGTM!

import { useLocalStorage } from '@rocket.chat/fuselage-hooks';
import type { ChangeEvent } from 'react';
import { useState, useMemo, useCallback } from 'react';
import type { ChangeEvent, Key } from 'react';

@coderabbitai coderabbitai Bot May 28, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the Select onChange prop type in Fuselage 0.78

# Check the Select component type definition
rg -A 10 "export.*Select.*=" node_modules/@rocket.chat/fuselage/dist/index.d.ts | head -30

# Look for onChange prop definition
rg "onChange.*Key" node_modules/@rocket.chat/fuselage/dist/index.d.ts

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 257


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Fuselage package files (top-level):"
ls -la node_modules/@rocket.chat/fuselage 2>/dev/null | head -50 || true

echo
echo "Find .d.ts files under fuselage (sample):"
find node_modules/@rocket.chat/fuselage -maxdepth 4 -name '*.d.ts' | head -50

echo
echo "Search for Select props typing in fuselage .d.ts:"
rg -n --hidden --no-ignore -S "interface .*Select|type .*Select|export .*Select" node_modules/@rocket.chat/fuselage -g'*.d.ts' | head -50

echo
echo "Search for onChange in Select-related d.ts (value param typing):"
rg -n --hidden --no-ignore -S "onChange\\??:.*Select|onChange\\??:.*(Key|React\\.Key|string|number)" node_modules/@rocket.chat/fuselage -g'*.d.ts' | head -80

echo
echo "Search for 'SelectProps' occurrences:"
rg -n --hidden --no-ignore -S "SelectProps" node_modules/@rocket.chat/fuselage -g'*.d.ts' | head -50

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 242


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check if node_modules exists:"
ls -la node_modules 2>/dev/null | head -50 || echo "node_modules/ not present"

echo
echo "Locate `@rocket.chat/fuselage` version in package manifests:"
rg -n "\"`@rocket.chat/fuselage`\"" package.json **/package.json -S || true

echo
echo "Search lockfiles for `@rocket.chat/fuselage`:"
ls -ლა | rg -n "yarn.lock|package-lock.json|pnpm-lock.yaml|npm-shrinkwrap.json" || true

for f in yarn.lock package-lock.json pnpm-lock.yaml npm-shrinkwrap.json; do
  if [ -f "$f" ]; then
    echo "---- $f ----"
    rg -n "`@rocket.chat/fuselage`" "$f" -S | head -20 || true
  fi
done

echo
echo "Search codebase references to SelectLegacy/Select usage:"
rg -n "SelectLegacy|from '`@rocket`\.chat/fuselage'.*Select|<Select" src -S || true

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 5230


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "List `@rocket.chat` scope dirs:"
ls -la node_modules/@rocket.chat 2>/dev/null || true

echo
echo "Find fuselage-related packages under node_modules:"
find node_modules -maxdepth 4 -type d -name '*fuselage*' 2>/dev/null | head -100

echo
echo "Try locating Select type definitions in node_modules:"
rg -n --hidden --no-ignore -S "interface .*Select|type .*Select|SelectProps" node_modules -g'*.d.ts' 2>/dev/null | head -80

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 5883


🌐 Web query:

@rocket.chat/[email protected] Select onChange Key type definition

💡 Result:

In @rocket.chat/fuselage@0.78.0, the modern Select component’s onChange prop type is the “selected value” (not the browser event). TypeScript signature (as used in Rocket.Chat code): - onChange: (value: ) => void, where the selected value corresponds to the option “value” shape you provide in SelectOption[] (commonly a string/number that comes from the first element of the SelectOption tuple). What you pass as the handler therefore depends on your SelectOption tuple/value type. Example from Rocket.Chat shows SelectOption imported from @rocket.chat/fuselage and an onChange handler passed directly as setServerName (value only), and other examples call handleClockMode while converting the select value to string when the option values are strings. Evidence: - Rocket.Chat migrates to the modern Select and imports SelectOption from @rocket.chat/fuselage; they pass onChange={setServerName} with value={serverName} (i.e., the handler takes the selected value, not an event) [1]. - In the same migration, SelectOption is used to type option arrays that are tuples whose first element is the option value (including a note about the tuple type needing adjustment), and the code shows Select being used with value={clockMode.toString} onChange={handleClockMode} [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/ui/components/DownloadsManagerView/index.tsx"
echo "==> File: $FILE"
nl -ba "$FILE" | sed -n '1,120p' || true
echo
echo "==> Select-related section (around known matches):"
nl -ba "$FILE" | sed -n '200,320p' || true
echo
echo "==> Search for SelectOption / String(value) / onChange handlers in the file:"
rg -n "SelectOption|onChange|String\\(value\\)|Key\\b|value:\\s*Key" "$FILE" -S || true

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 817


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/ui/components/DownloadsManagerView/index.tsx"
echo "=== Handlers around lines ~50-140 ==="
sed -n '40,150p' "$FILE" | cat

echo
echo "=== Select JSX around lines ~220-290 ==="
sed -n '210,290p' "$FILE" | cat

echo
echo "=== Search for Select option arrays in this file ==="
rg -n "SelectOption|options=|items=|options\\b|option\\b|value=\\{|<Select" "$FILE" -S || true

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 6466


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n "enum DownloadStatus|type DownloadStatus|const DownloadStatus|DownloadStatus\\.ALL" src -S

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 1459


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/downloads/common.ts"
echo "==> $FILE"
sed -n '1,120p' "$FILE" | cat

echo
echo "==> Search for DownloadStatus export typings/usages in file"
rg -n "export const DownloadStatus|DownloadStatus\\b" "$FILE" -S

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 881


Remove precision-loss concern: these Select option values are always strings

In src/ui/components/DownloadsManagerView/index.tsx, all Select options are constructed as [string, string][], and DownloadStatus values are string literals ('All' | 'Paused' | 'Cancelled'). Since the selected value therefore originates as a string, setXFilter(String(value)) won’t involve numeric-key precision loss. Using (value: string) for these handlers would match the inferred selected-value type more precisely.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/ui/components/DownloadsManagerView/index.tsx` at line 17, The Select
onChange handlers in DownloadsManagerView currently type their event/value
imprecisely (importing ChangeEvent/Key); update the handler signatures to accept
(value: string) since all Select options are string pairs and DownloadStatus is
a string union, then call the existing setters (e.g., setStatusFilter,
setXFilter) with that string directly. Remove the unused ChangeEvent/Key imports
and adjust any handler references (e.g., handleStatusChange, handleXYZChange) to
use the (value: string) parameter so the selected-value type matches the options
and eliminates the precision-loss concern.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not applying. The exported Select from @rocket.chat/fuselage 0.78 types onChange as (key: Key) => any (Select.d.ts:16), not the generic V. Narrowing the handler param to (value: string) would no longer be assignable to that prop signature under strictFunctionTypes and breaks tsc. The (value: Key) + String(value) pattern is the correct match for the modern Select API. No precision loss occurs at runtime since options are [string, string][], but the param type must stay Key to satisfy the prop.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Add downloads.empty and downloads.noResults keys (introduced in 2b0332d)
to 15 maintained locales: de-DE, es, fi, fr, hu, ja, no, pl, pt-BR, ru, sv,
tr-TR, uk-UA, zh-CN, zh-TW.
@jeanfbrito
jeanfbrito merged commit 6370ae7 into master Jun 10, 2026
8 checks passed
@jeanfbrito
jeanfbrito deleted the polish-downloads branch June 10, 2026 13:26
jeanfbrito added a commit that referenced this pull request Jun 11, 2026
Ports the parts of #3344 that were not absorbed by the merged Fuselage
migration (#3349):

- Replace deprecated bare color tokens with explicit font-* tokens
  (font-default, font-hint, font-annotation) in ServerInfoContent,
  DocumentViewer, MarkdownContent, PdfContent, and TopBar
- Replace the fake-link action button in CertificatesManager with a
  proper Fuselage Button
- Use the Inter-first font stack in GlobalStyles instead of system-ui
- Commit the design context files (DESIGN.md, PRODUCT.md,
  .impeccable/design.json) that #3344 introduced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant