Commit Graph

27 Commits

Author SHA1 Message Date
simoleo89 c311f3597d fix(friendbar): guarantee a single find-friends chip (filter null friends)
The legacy bar rendered MAX_DISPLAY_COUNT FriendBarItemViews and padded
empty slots with null, so an empty online-friends list produced three
identical 'Trova Amici' buttons. The current bar already renders a single
explicit search chip, but harden it: filter null/undefined out of the
online-friends array before slicing/mapping so the search chip is the only
possible source of that affordance — exactly one, always.
2026-06-14 20:26:47 +02:00
simoleo89 1f0fa03702 Merge origin/main into main
Resolved 2 messenger conflicts:
- FriendsMessengerView.tsx: union — kept local typingUserIds/sendTypingStatus
  from useMessenger() plus upstream's useFriends().getFriend.
- FriendsView.css: kept local group-chips + typing-indicator styles (upstream
  empty there).
Vitest 545/545 green. (typecheck TS2307 is the un-linked renderer, env-only.)
2026-06-07 11:50:32 +02:00
DuckieTM fbd4a484ac Merge pull request #210 from simoleo89/fix/messenger-offline-avatar
fix(messenger): show real avatar for offline friends + fix head framing
2026-06-07 08:21:22 +02:00
simoleo89 1eb4d5594b fix(messenger): show real avatar for offline friends + fix head framing
The messenger rendered the participant figure straight from the frozen
thread participant, so offline friends (whose look used to be empty)
showed the anonymous/standard avatar. Read the live look from the friend
list via getFriend() - the same source the friends list renders - with
resolveAvatarFigure() as the final fallback, so the real avatar shows
even when offline (pairs with the server fix that now sends offline
looks). Applied to both the avatar-bar tab and the in-thread avatars.

Also fix the avatar-tab head framing: it positioned the head-only image
with full-body geometry (90x130, top:-31px), clipping the head. Render
the head at native size (background-size:auto, no scaling -> not grainy)
and centre it in the 36x36 tab.
2026-06-07 00:37:20 +02:00
simoleo89 d7fabcd777 fix(friendbar): auto-fit visible friend count so the bar stops clipping
The online-friends bar is portaled into the right toolbar nav, which sits
inside `tb-nav-clip` (fixed, `max-w-[calc(50vw-242px)]`, `overflow-x: clip`).
Each online friend adds a fixed `w-[132px]` chip, so the bar grew with every
friend up to MAX_DISPLAY_COUNT (3). Once it exceeded the clip width the right
edge was silently cut off - the scroll arrow and part of the search button
disappeared. The portal slot is `shrink-0`, so the chips never compressed;
they just overflowed and got clipped. Net effect: "more friends online =
broken bar".

Measure the room actually available between the bar's left edge and the
viewport's right edge (re-measured on resize / ResizeObserver) and derive an
effective visible count clamped 1..3, always reserving space for both arrows
and the search chip so nothing clips at any width or friend count. The bar's
left edge is stable (it follows fixed-width toolbar icons), so changing the
chip count never moves it - no measurement feedback loop.

Scroll offset now derives a clamped safeOffset used by every read, so a
stale indexOffset after the list shrinks / the fit grows renders correctly
and self-corrects on the next arrow click (no write-back effect).
2026-06-06 19:01:19 +02:00
simoleo89 dc7012794e fix(messenger): send typing-stop to peer when switching conversations 2026-06-02 21:25:21 +02:00
simoleo89 7d89ce14d0 feat(messenger): send typing status + show 'is typing' indicator 2026-06-02 21:15:53 +02:00
simoleo89 775e8b27af feat(messenger): render sent/read checkmarks on own messages 2026-06-02 20:25:03 +02:00
simoleo89 db050b99e7 feat(messenger): show 'sent while offline' marker in thread 2026-06-02 19:11:05 +02:00
simoleo89 2291d3cfa8 feat(friends): per-friend assign-to-group control 2026-06-02 18:26:44 +02:00
simoleo89 860ec07dfd feat(friends): group chip-filter row over online/offline list + manager wiring 2026-06-02 18:20:31 +02:00
simoleo89 7913952f71 fix(friends): reset stale edit state on category refresh + localize manager labels where keys exist 2026-06-02 18:12:53 +02:00
simoleo89 39bcfdb0cd feat(friends): category manager modal (create/rename/delete groups) 2026-06-02 18:07:40 +02:00
simoleo89 a39aa37231 React 19: useRef<T>() -> useRef<T>(null) across 15 sites
React 19 dropped the no-arg useRef overload — the type-only useRef<T>()
form (no initial value) is gone, every call must pass an initial value.
The codebase had 15 occurrences of useRef<HTMLDivElement>() (DOM ref
pattern) all flagged by tsgo as 'Expected 1 arguments, but got 0'.

Mechanical sweep to useRef<HTMLDivElement>(null) — no behavior change,
React still hands out a ref object with .current set to null at mount.

Net tsgo error count: 57 -> 42.
2026-05-11 21:33:58 +02:00
simoleo89 b5eeb68b9b Type framer-motion variants as Variants — kill 33 tsgo errors
ToolbarView and FriendsBarView declared their motion variant objects
without a type annotation, so tsgo widened transition.type to 'string'
where framer-motion's Variants narrows it to a literal union (spring /
tween / inertia / etc). Every <motion.div variants={...} /> site flagged
the mismatch.

Annotating the constants as Variants makes the literal inference work
('spring' stays 'spring'); also drops the redundant 'as const' on
staggerDirection now that the parent type pins it.

Net tsgo error count: 133 -> 100.
2026-05-11 21:12:34 +02:00
simoleo89 535fa71020 ESLint --fix: auto-fix brace-style, indent, semi, no-trailing-spaces
Run eslint --fix across src/ to clear ~1900 mechanical lint errors
surfaced by the @typescript-eslint v8 + react-hooks v7 + react-compiler
upgrade in the React 19 modernization PR.

Issues fixed automatically:
- brace-style (Allman): try/catch one-liners reformatted to multi-line
- indent: tab-vs-space and depth corrections
- semi: missing trailing semicolons
- no-trailing-spaces

No semantic changes. Remaining 701 errors are real-code issues
(set-state-in-effect, rules-of-hooks, no-unsafe-* type checks) that
need manual per-file review.

https://claude.ai/code/session_01GrR87LAqnAEyKG2ZbmQt5Q
2026-05-11 16:31:50 +00:00
Lorenzune 71171dc205 Merge remote-tracking branch 'duckie/main' into merge-duckie-main-2026-05-06
# Conflicts:
#	index.html
#	public/UITexts.example
#	public/renderer-config.example
#	src/App.tsx
#	src/components/login/LoginView.tsx
#	src/components/room/widgets/avatar-info/infostand/InfoStandWidgetUserView.tsx
#	src/components/toolbar/ToolbarView.tsx
#	src/components/user-profile/UserContainerView.tsx
2026-05-06 04:23:15 +02:00
duckietm eb0bf80dfa 🆙 Fix the avatar-editor faces 2026-04-29 15:44:17 +02:00
duckietm a266696eb6 🆙 Added BuildHeight to NitroV3 2026-04-28 13:47:39 +02:00
Lorenzune 726d1cc5c8 Merge latest duckie main with login UI 2026-04-21 11:53:30 +02:00
Lorenzune 9b36513def WIP preserve local changes before duckie merge 2026-04-21 11:13:32 +02:00
duckietm a770b99e2e 🆙 Added the BuildTools button, and redesign toolbar 2026-04-14 13:54:15 +02:00
Lorenzune 954e477e47 feat: add builders club catalog ui flow 2026-04-07 14:40:51 +02:00
Lorenzune 36c0221a54 chore: checkpoint current work 2026-04-03 05:22:26 +02:00
duckietm 9939e90828 🆙 Fixed the friends components 2026-02-27 13:56:33 +01:00
duckietm f2446d232b 🆙 Upgrade to tailwind css 4.2.0 2026-02-20 08:17:17 +01:00
DuckieTM 7feb10ab15 🆙 Init V3 2026-01-31 09:10:52 +01:00