Commit Graph

212 Commits

Author SHA1 Message Date
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 017768693f Merge pull request #209 from simoleo89/feat/mentions-overhaul
feat(mentions): overhaul, refactor & default-notification integration
2026-06-07 08:21:05 +02:00
simoleo89 dcbf44aedb feat(mentions): overhaul, refactor, notification bubble & window update
Chat tagging:
- Any @user is a visible tag in chat bubbles (the .mention-tag CSS never
  existed, so highlighting was invisible); self/alias mentions get a gold
  emphasis. Fixes cross-room tags not being highlighted.

Mentions window:
- Redesigned: unread count in the header, restyled filter chips + a refresh
  button, CSS-driven list/date-groups, adaptive height (compact when few,
  capped + scroll when many), polished empty state.
- Rows: framed avatar (friends-list head crop so the face is never clipped),
  per-row unread dot, type marker, icon action buttons (goto / remove).
- Re-requests from the server each time it opens.

Autocomplete:
- Never suggests the viewer themselves; suggests room users + online friends +
  aliases.

Notifications:
- Mention toast removed; mentions flow through the client's standard
  notification stream via a dedicated mention bubble (avatar + actions) in the
  default position. EVERY received mention surfaces (independent of the generic
  info-feed toggle, gated only by mentions_ui.enabled).

Refactor (behaviour-preserving):
- Centralised @-token classification in api/mentions/mentionTokens.
- Moved mentionsFormat -> api/mentions, useMentionActions -> hooks/mentions.
- Extracted ChatInputView @-autocomplete into a tested useChatMentions hook +
  pure helper; removed the dead duplicate useMentionAutocomplete.
2026-06-06 23:37:17 +02:00
simoleo89 3d1f1103a3 feat(furni-editor): 'Import from Habbo' button to fetch official texts
useFurniEditor gains importText(id) + importResult (10049 round-trip); the
edit view shows an 'Import from Habbo' button that fills Display Name/
Description with the official text for review before Save (nonce-guarded,
classname-matched), with an inline result note.
2026-06-06 17:42:43 +02:00
simoleo89 4570244b48 feat(furni-editor): modernize search/list view + live search + server sort
- Restyle to match the editor: slate palette, rounded card, search bar
  with icon + focus ring, teal filter chips, larger furni thumbnails,
  loading skeleton + empty state.
- Live search (350ms debounce) with clear button; filters/sort apply
  immediately.
- Pagination: first/prev/next/last + page-jump input + 'Showing X-Y of Z'
  (was Prev/Next only across 3002 pages).
- Header sort now queries the server (sortField/sortDir) instead of
  reordering only the 20 visible rows; useFurniEditor.searchItems passes
  the sort through.
2026-06-06 17:42:43 +02:00
simoleo89 d45a0fb8b0 feat(furni-editor): optimistically reflect mirrored public_name on save
The server now mirrors the furnidata display name into
items_base.public_name, so on updateFurnidata patch selectedItem.publicName
immediately; the auto detail re-fetch that follows agrees with the DB
value (no flicker). Not applied to revertFurnidata (revert restores the
previous DB name).
2026-06-06 17:42:42 +02:00
simoleo89 7e72e34088 feat(furni-editor): updateFurnidata/revertFurnidata hook actions 2026-06-06 17:42:41 +02:00
simoleo89 de922334b7 feat(furni-editor): 'Import from Habbo' button to fetch official texts
useFurniEditor gains importText(id) + importResult (10049 round-trip); the
edit view shows an 'Import from Habbo' button that fills Display Name/
Description with the official text for review before Save (nonce-guarded,
classname-matched), with an inline result note.
2026-06-06 15:26:24 +02:00
simoleo89 d699964542 feat(furni-editor): modernize search/list view + live search + server sort
- Restyle to match the editor: slate palette, rounded card, search bar
  with icon + focus ring, teal filter chips, larger furni thumbnails,
  loading skeleton + empty state.
- Live search (350ms debounce) with clear button; filters/sort apply
  immediately.
- Pagination: first/prev/next/last + page-jump input + 'Showing X-Y of Z'
  (was Prev/Next only across 3002 pages).
- Header sort now queries the server (sortField/sortDir) instead of
  reordering only the 20 visible rows; useFurniEditor.searchItems passes
  the sort through.
2026-06-06 15:08:47 +02:00
simoleo89 7384a12b92 feat(furni-editor): optimistically reflect mirrored public_name on save
The server now mirrors the furnidata display name into
items_base.public_name, so on updateFurnidata patch selectedItem.publicName
immediately; the auto detail re-fetch that follows agrees with the DB
value (no flicker). Not applied to revertFurnidata (revert restores the
previous DB name).
2026-06-06 14:03:59 +02:00
simoleo89 c63702bdac feat(furni-editor): updateFurnidata/revertFurnidata hook actions 2026-06-06 02:43:45 +02:00
simoleo89 472a41711a Merge remote-tracking branch 'fork/main'
# Conflicts:
#	public/configuration/UITexts_en.json5.example
#	public/configuration/UITexts_it.json5.example
#	src/components/MainView.tsx
#	src/css/friends/FriendsView.css
2026-06-06 00:17:32 +02:00
duckietm f4d41dd3c9 Take #2 Desktop cacta 100% 2026-06-05 14:32:55 +02:00
duckietm 9982c96b63 🆙 Bug fixed in localstorage 2026-06-04 13:50:40 +02:00
duckietm 59ed27b727 Revert "🆙 Bug fixed in localstorage"
This reverts commit 47453db5ee.
2026-06-04 13:43:29 +02:00
duckietm 47453db5ee 🆙 Bug fixed in localstorage 2026-06-04 13:43:04 +02:00
duckietm 7007752e91 🆙 Mention Now in UI-Config and UITexts and not hardcoded 2026-06-04 11:32:55 +02:00
DuckieTM a4137af4fe Merge branch 'main' into Dev 2026-06-04 10:45:59 +02:00
medievalshell 0df810c556 feat(mentions): @ autocomplete, blue @nick, avatar notification toast
- Chat input @ autocomplete: typing @ shows online users (room users +
  online friends + room aliases) with avatars; arrows/Tab/Enter to pick.
- Any valid @nick token is highlighted blue in chat bubbles (like @all),
  giving visual feedback that it is a recognised mention.
- Side notification toast on a received mention: sender avatar (from the
  new senderFigure wire field) + message + dismiss; dismiss marks it read
  so the toolbar unread badge updates. Auto-hides after 8s.
- IMentionEntry/parsers carry senderFigure end to end.
2026-06-04 01:18:26 +02:00
medievalshell f8e943d262 feat(catalog): live-merge imported furni on catalog open
On catalog open, re-fetch the custom furnidata chunk (custom/imported.json5) via
SessionDataManager.mergeFurnitureDataFromUrl() and feed the new entries to
RoomContentLoader.processFurnitureData(), so furniture imported from the admin
panel appears without a full client reload.
2026-06-03 23:28:33 +02:00
DuckieTM 155d85d3e7 Merge pull request #194 from duckietm/Dev
Dev
2026-06-03 16:42:51 +02:00
DuckieTM c76fbf7ea8 Merge branch 'main' into feat/command-autocomplete-refactor 2026-06-03 16:33:58 +02:00
Medievalshell 62062cec9e Merge branch 'duckietm:Dev' into Dev 2026-06-03 13:06:25 +02:00
medievalshell 8b44aee0df Fix navigator tabs locking after entering room creator
setTab updated currentTabCode/currentFilter but never reset isCreatorOpen, so after opening the room creator, clicking another navigator tab changed the active tab code while the creator view stayed rendered (NavigatorView renders the search and creator views mutually exclusively based on isCreatorOpen). This left users stuck in the creator unable to switch tabs. Reset isCreatorOpen to false in setTab so selecting any tab also closes the creator.
2026-06-03 13:04:07 +02:00
simoleo89 dd7d504be2 Merge remote-tracking branch 'origin/Dev' into feat/messenger-groups-receipts
# Conflicts:
#	public/configuration/UITexts.example
#	src/css/friends/FriendsView.css
2026-06-02 21:52:59 +02:00
simoleo89 361ab27853 feat(messenger): incoming typing state + outgoing typing action 2026-06-02 21:11:03 +02:00
simoleo89 8ae48005f3 fix(messenger): reliably send mark-read on thread focus via latest-value ref 2026-06-02 20:37:20 +02:00
simoleo89 ef60aa8ebd feat(messenger): send mark-read on focus, mark own messages read on receipt 2026-06-02 20:19:38 +02:00
simoleo89 f506b83387 feat(chat): improve command autocomplete and command alerts 2026-06-02 18:34:50 +02:00
simoleo89 1af038806b feat(chat): improve command autocomplete and command alerts 2026-06-02 18:31:49 +02:00
simoleo89 5be38e7df3 feat(friends): category CRUD + assign actions in friends store 2026-06-02 17:59:13 +02:00
simoleo89 c576c6185a feat(mentions): use dedicated mention chime sample 2026-06-02 15:04:12 +02:00
simoleo89 49d3bde50a feat(mentions): richer inbox — filters, date groups, type badge, relative time, per-row actions, highlighted preview 2026-06-02 15:04:12 +02:00
simoleo89 c67c90d4c1 feat(mentions): inbox window, toolbar badge, chat-history tab, ui-config + i18n 2026-06-02 15:04:11 +02:00
simoleo89 afb8100300 feat(mentions): client api types, store, snapshot + message hooks 2026-06-02 15:04:11 +02:00
DuckieTM 67d53fde3a Merge pull request #181 from simoleo89/feat/fortune-wheel-improvements
feat(fortune-wheel): celebration reveal, spin animation & prize editor add/remove
2026-05-31 15:44:42 +02:00
DuckieTM 7e0d70a7e6 Merge branch 'Dev' into Dev 2026-05-31 15:43:52 +02:00
medievalshell 8097344561 feat(theme): runtime custom theme ecosystem (graphics-only)
Runtime-loaded visual re-skin system (no client rebuild, real themes never
hit git). A theme = a folder on the server (theme.base.url) with a manifest +
CSS "pieces"; each piece is toggled from Settings > Themes (checkboxes). A
broken/404 piece auto-falls back to the default (per piece). Hotel-wide default
via ui-config theme.default (+ theme.default.pieces), per-user override in
localStorage (same pattern as the catalog style toggle).

- api/theme/ThemeManager: fetch index/manifest + inject/remove <link> + fallback
- hooks/theme/useThemes: state + persist + default-from-config + live apply
- components/theme/ThemeApplier: applies on boot (mounted in MainView)
- UserSettings: General/Themes tabs with theme selector + per-piece checkboxes
- custom-themes/: reference template (demo theme "Neon Viola" + README)
- .gitignore: public/custom-themes/ (real themes are never committed)
2026-05-31 14:39:59 +02:00
simoleo89 ccebcad8a8 feat(fortune-wheel): celebration reveal, spin animation, prize editor add/remove
Player experience:
- Tiered win celebration overlay (WheelWinReveal): quiet message for the
  "nothing" slice, lighter reveal for common prizes, full confetti +
  jackpot glow for rare ones. Rarity classified client-side by type +
  amount (wheelPrizeTier), shared icon rendering (wheelPrizeIcon).
- Three-phase spin motion (wind-back -> overshoot -> settle) with a
  reduced-motion fast path; responsive wheel scaling via ResizeObserver.

Reveal-timing fix:
- The server pushes the refreshed winners list (which already contains the
  just-won prize) the instant it answers the spin, ~5s before the wheel
  stops. useFortuneWheel now buffers that update mid-spin and flushes it in
  finishSpin so the prize is no longer spoiled in the winners panel.
- handleTransitionEnd only reacts to the wheel's own transform transition,
  so a child icon's bubbling transitionend can't advance the spin phase
  machine early.

Prize editor (admin):
- Add/Remove prize buttons in FortuneWheelSettingsView. New rows carry a
  negative temp id collapsed to 0 on the wire (server inserts); removed rows
  are simply omitted (server soft-disables). Requires the matching emulator
  change to WheelManager.savePrize / WheelAdminSavePrizesEvent.

i18n: wheel.win.* and rarevalues.editor.add/remove in en/it/nl.
2026-05-31 10:47:51 +02:00
simoleo89 7f9e31eec3 fix(navigator): drop vestigial TanStack invalidateQueries from useNavigatorSearch
The hook is the useState/useMessageEvent variant; the leftover
useQueryClient().invalidateQueries call required a QueryClientProvider
the unit test didn't supply (6 failures). The FlatCreatedEvent handler
already re-sends the search composer, so the invalidate was dead code.
2026-05-31 01:06:44 +02:00
simoleo89 e610cfeef4 feat(navigator): reactive favourites via fine-grained store (P3)
Move favourite room ids out of the useBetween navigator store into a
dedicated Zustand store. useNavigatorFavourite(roomId) subscribes only
to s.ids.has(roomId) (a boolean), so a FavouriteChangedEvent for one
room no longer re-renders every favourite-aware view. apply() returns
the same state reference when membership is unchanged.
2026-05-31 01:03:31 +02:00
Life b17cd891b3 Merge branch 'duckietm:main' into feat/navigator-p4-visual-wave1 2026-05-30 09:38:44 +02:00
medievalshell dc0a8f965e feat(catalog): toggle stile catalogo classico/moderno
Aggiunge un checkbox nelle impostazioni utente per scegliere lo stile del
catalogo (classico vs moderno) + flag globale catalog.classic.style in
ui-config.json come default per tutti. Override per-utente in localStorage.
2026-05-29 23:36:06 +02:00
medievalshell 643e558aa8 Merge remote-tracking branch 'upstream/Dev' into Dev
# Conflicts:
#	src/hooks/navigator/useNavigatorSearch.ts
2026-05-29 23:06:48 +02:00
duckietm d0c11f047a 🆙 Complete rebuild of toolbar / catalog / inventory make it 100% mobile friendly Take #1 2026-05-29 11:30:17 +02:00
duckietm fbcda88cd3 🆙 Update Rare-Value page and fix the loading of the json 2026-05-29 08:31:18 +02:00
medievalshell b360595539 Merge upstream/Dev: fortune wheel settings popup + radio toggle
Adopt upstream wheel redo (Settings popup gated by acc_wheeladmin,
RareValues becomes view-only) and the radio enable/disable config gate.
Drop the broken orphaned duplicates under user-settings/fortune-wheel
and user-settings/rare-values (wrong relative import depth, unused,
failed typecheck). Soundboard / radio / background editor untouched.
2026-05-28 22:28:00 +02:00
simoleo89 3bce0c0191 feat(navigator): empty-state + skeleton views, fix double search fetch (P4 wave 1a)
Visual polish, first wave:
- NavigatorEmptyStateView: replaces the bare "No rooms found" text with a
  centered icon + message + a Create-room CTA. Reuses existing i18n keys
  (navigator.search.returned.no.results / .roomsettings.moderation.none /
  .createroom.create) so no new localization entries are needed.
- NavigatorSearchSkeletonView: animate-pulse placeholder rows shown while a
  search is in flight and no result is cached yet (matches the HK dashboard
  skeleton pattern). Replaces the NitroCard.Content spinner overlay for the
  result list.

Bug fix bundled in: NavigatorSearchView called useNavigatorSearch() a second
time purely to read searchResult for its input-sync effect. Since the hook is
not a useBetween singleton, that registered a duplicate NavigatorSearchEvent
listener AND fired a duplicate NavigatorSearchComposer on every search.
NavigatorView now owns the single useNavigatorSearch() call and passes
searchResult to NavigatorSearchView via prop.

Test maintenance: useNavigatorSearch.test.tsx was written for the original
useNitroQuery implementation, which upstream reverted (05d71dd1) to
useMessageEvent + useState. Removed the dead QueryClient scaffolding, fixed
case 1 (assert no fetch starts with empty tab), dropped case 7 (the query
invalidator no longer exists). 6 cases, all green.

Full suite 471/471. Typecheck: only the environmental renderer-mismatch
errors (soundboard / rare-values / floorplan APIs absent from the linked
renderer), none in navigator files.
2026-05-28 18:02:48 +02:00
duckietm 47e8338570 🆙 Wheel of prizes ! 2026-05-28 16:27:48 +02:00
medievalshell 7a0b57e267 fix(navigator): ignore search events while disabled + invalidate on FlatCreated
useNavigatorSearch had two gaps its tests cover:
- with no active tab the query is disabled, but a NavigatorSearchEvent still
  updated the data; now such events are ignored until a tab is active
- a newly created room (FlatCreatedEvent) now invalidates the
  ['navigator','search'] query and refetches the current search

Fixes the 2 failing useNavigatorSearch tests; full suite 472/472.
2026-05-28 15:39:46 +02:00