Commit Graph

225 Commits

Author SHA1 Message Date
pavlov346346-source
1ae56fb57b Fit nine calendar orders per day and preserve all printed events 2026-09-17 21:25:25 +03:00
pavlov346346-source
2d49563b9d Add banquet packages, dish sections and guest totals 2026-09-17 21:07:54 +03:00
pavlov346346-source
57f5807953 Require account login and isolate all company client caches 2026-09-17 20:40:24 +03:00
pavlov346346-source
c18c49770d Start new companies with empty private catalogs 2026-09-17 20:27:07 +03:00
pavlov346346-source
48ffa51748 Preserve imported order history and saved order pricing 2026-09-17 20:15:32 +03:00
pavlov346346-source
11b2bf84c9 Separate account sidebar identity from company document branding 2026-09-17 19:51:01 +03:00
pavlov346346-source
c31f868c83 Apply saved theme before first paint and prevent startup flicker 2026-09-17 19:16:19 +03:00
pavlov346346-source
da8ff042f7 Restore Caterium schema and switch production to fresh Supabase 2026-09-17 17:30:57 +03:00
pavlov346346-source
2f7b8b9ea9 feat: add banquet menu constructor tab
Add a new "Банкетное меню" catalog tab (category 6) alongside Боксы/
Премиум/Посуда for composing wedding/banquet/anniversary menus. Unlike
the other tabs, dishes here are priced and weighed per guest, grouped
by menu section (catalogSection), and clicking a checkbox doesn't add
to the order directly -- it toggles inclusion in a live summary panel
showing a running per-guest price table for the whole composed menu.

The item editor gets two new fields (menu section, weight per guest)
shown only for this category, reusing the existing generic item CRUD
(editBox/saveBox) rather than building a parallel admin UI.

Also re-bumped index.html's script cache-busting query string, which
the previous whitelist-fix commit changed the content of app-runtime.js
without updating -- the same stale-cache bug fixed earlier in the
session, now closed for directly-tagged scripts too.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 18:02:02 +03:00
pavlov346346-source
7446a551f6 fix: allow premium-dark/premium-emerald in template id whitelists
Two separate Set-based whitelists (OFFER_TEMPLATE_IDS in app-runtime.js
and TEMPLATE_IDS in ux-fixes-v1764.js) validated any explicit template
selection before persisting/rendering it, but neither had been updated
when premium-dark/premium-emerald were added. The per-order "Оформление
PDF" picker's click handler calls persistOfferTemplate(), which silently
returned false when the id failed this check -- so clicking either
premium card in an order's offer modal did nothing, no error, no toast.
Verified end-to-end against a real order: both ids now persist and the
picker shows the selected state correctly.

Also bumped performance.js's internal RELEASE tag, since it gates the
cache-busting query string used to dynamically load ux-fixes-v1764.js
and eight other core modules -- otherwise this fix would hit the same
stale-cache issue just fixed in index.html.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 13:46:15 +03:00
pavlov346346-source
5ead4a7f0c feat: add visual heading to midnight-checklist menu section
Replace the plain white "МЕНЮ" text label with a gold icon badge,
item count, and divider line, matching the icon-badge language already
used elsewhere in the template instead of a bare heading.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 13:36:09 +03:00
pavlov346346-source
37a8dd5bb3 fix: bump stale cache-busting version on core script tags
The signature-offer-pdf-v18.js script tag's ?v= query string was never
updated across ~9 content commits since the file was created, so browsers
kept serving a stale cached copy indefinitely. All other script/style tags
shared an equally stale v17.7.3 tag. Bumped every tag in index.html to a
single fresh version string so all recent fixes (template selection,
merged addon card, controlLines/extraServices wiring) actually reach users
without a manual hard refresh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 13:33:41 +03:00
pavlov346346-source
14e3d6b45b fix: merge addon pills into one card, wire it to editable Settings
Two related fixes reported directly against live screenshots:

1. addonRow rendered each addon ("Напитки", "Чайная станция", ...) as
   its own tall bordered pill sitting side by side -- disjointed, and
   unlike the single-card "Полезные дополнения" treatment in the
   referenced design. Now draws one card with a heading
   ("Рекомендуем добавить") containing all the icon+label items,
   matching how checklistCard already works.

2. The addon list and the "Всё под контролем" checklist were hardcoded
   constants in the canvas module, completely bypassing the app's
   existing editable Client Offer Settings (Настройки → Предложение →
   "Дополнительно к заказу", textarea-backed extraServices/controlLines
   the user can already edit for the old templates). preparedSnapshot
   now attaches the resolved controlLines/extraServices/titles onto
   every snapshot; the 8 signature templates read them via a local
   shadowing const (falls back to the previous defaults when nothing
   is configured), so editing that Settings textarea now actually
   changes what shows up in these templates too, on all 8 of them from
   one change since addonRow/checklistCard are shared helpers.

Verified locally: default list (6 items) lays out cleanly in one card
with 2-line wrapping where needed; a snapshot with custom
controlLines/extraServices renders those exact custom strings instead
of the defaults, confirming the wiring actually works end to end and
isn't just falling back silently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 11:28:18 +03:00
pavlov346346-source
44bf5e9af1 feat: add 2 new templates modeled on the referenced menu.furset.ru design
User pointed at https://menu.furset.ru/view/23855347 as a design they
like and asked for a couple more templates in that direction. Added:

- premium-dark: near-black background, warm gold accents, real
  line-drawn icon badges (calendar/people/box -- not emoji) for the
  date/guests/boxes stats, bullet-point value props under the title,
  minimal flat menu list -- closely matching that reference's visual
  language instead of the card-heavy style of the existing templates.
- premium-emerald: the same layout in an emerald-green palette, as
  the second "couple" of designs requested, sharing the cover code
  with premium-dark and only differing by PALETTES entry.

Both plug into the existing shared renderContentPages engine, so they
get proper multi-page menu + pricing pages for free, consistent with
all 6 existing signature templates. New icon-drawing helpers
(iconBadge/iconCalendar/iconPeople/iconGauge/iconBox, statBadgeRow,
bulletList) live in the shared helper section for reuse.

Verified locally: both render in <70ms combined, produce 3 pages each
for a normal order, and hold up under the same adversarial-data pass
used for the other 6 (long names, 350 guests, seven-figure price,
item with no photo/price/category) -- no overlap, no crashes, generous
ellipsis truncation throughout. Fixed one real bug found while
testing: the date value in the stat badge ("8 августа 2026 г.") was
getting ellipsis-truncated at font-size 20px; reduced to 16px so it
fits cleanly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 11:11:43 +03:00
pavlov346346-source
28fd97bcf3 fix: replace gourmet-hero's fake category tabs with real ones
Same issue as the cards just removed from cream-elegance: a hardcoded
['РЫБНЫЕ','МЯСНЫЕ','ВЕГЕТАРИАНСКИЕ','САЛАТЫ','ДЕСЕРТЫ'] tab row that
had nothing to do with what was actually in the order (an order with
zero vegetarian items still showed a "ВЕГЕТАРИАНСКИЕ" tab as if
active/relevant). Now derives the chip row from the distinct
categoryName values actually present on the order's items, and
renders nothing if that data isn't available.

Verified this pass end-to-end rather than just by inspection:
- Real "Скачать PDF" pipeline (sunClientOfferDebugPdf) produces a
  valid application/pdf blob with a correct %PDF-1.4 header, not just
  canvases.
- Confirmed Canvas text genuinely falls back through the font stack
  (measured identical metrics for an unregistered font vs. Georgia
  directly, and document.fonts.load() resolves instantly for a
  never-registered family) -- so a blocked/unreachable Google Fonts
  degrades silently to Georgia/Arial instead of hanging or erroring,
  which matters given this app already had to work around Russia
  connectivity issues elsewhere.
- Re-rendered all 6 templates against deliberately adversarial data
  (150+ word event name, 44-char client name, 350 guests, a
  million-ruble price, an item with no photo/price/category, a long
  promo code) -- no crashes, no overlap, graceful ellipsis truncation
  throughout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 10:57:29 +03:00
pavlov346346-source
b702b4b69e fix: remove static category cards from cream-elegance cover
They were hardcoded labels (Рыбные закуски / Мясные закуски / Для
вегетарианцев / Мини-салаты) with a generic "Собрано под ваше
событие" caption that didn't reflect the actual order — confusing and
requested to be removed. The freed space now goes to a bigger 3x2
photo grid of the order's real items instead of leaving a gap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 10:41:10 +03:00
pavlov346346-source
d78ca14baf feat: bring the other 4 signature templates up to the same quality bar
- Fix the price band on cream-elegance: it was a solid muddy olive
  fill that didn't read as "this is your total" (reported directly by
  the user). It's now a white card with a gold border, matching the
  rest of that template's light card language; the dark templates'
  solid-fill price band is unchanged since that already reads well
  against a dark background.
- Give emerald-circles, midnight-checklist, gourmet-hero and
  diamond-gold the same treatment as the first 2: real fonts
  (Playfair Display/Montserrat or Unbounded/Manrope depending on
  aesthetic) instead of Arial/Georgia, the same center-alignment fixes
  applied everywhere text used align:'center', and their own
  fully-styled inner pages (menu + pricing) via the shared
  renderContentPages engine instead of the old generic base renderer.
- Fix two real regressions the font swap introduced and caught by
  rendering each template locally: gourmet-hero's headline was
  overflowing width and getting ellipsis-truncated ("КЕЙТЕРИНГ..."),
  and diamond-gold's heading was wrapping to a second line that
  collided with the subtitle below it. Both fixed with size/width
  adjustments verified by direct canvas measurement.
- All 6 signature templates are selectable in Settings again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 10:14:25 +03:00
pavlov346346-source
51e2fa4c33 feat: give cream-elegance and neon-menu their own matching inner pages
The cover for these 2 templates was fully custom, but the item-list
and pricing pages behind it still came from the old generic base
renderer (Arial, different card style, different page chrome) — so a
downloaded offer read as a nice cover stapled to a plain, differently
styled document ("два предложения").

Both templates now render their own item-list pages (photo, name,
category/weight, qty and line total, paginated ~10 rows/page) and a
matching pricing-breakdown page (base cost, discount, promo, delivery,
total, per-guest), using the same fonts, palette and card language as
the cover, with a shared footer/page-number treatment across every
page. The other 4 signature templates and the 13 classic ones are
untouched and keep using the original base renderer.

Verified locally: 8 items -> 3 pages (cover + 1 menu + pricing),
15 items -> 4 pages (cover + 2 menu + pricing), 0 items -> 3 pages,
no errors, base renderer confirmed never invoked for these 2 ids.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 09:58:07 +03:00
pavlov346346-source
c0bb18d5f7 fix: polish the 2 kept offer templates — alignment, fonts, gallery
- Fix a systemic centering bug: several canvas text() calls used
  align:'center' but passed the box's left edge as x instead of its
  midpoint, so headings, badge numbers, checkmarks and chip labels
  rendered pinned to the left instead of centered (most visible on
  cream-elegance's "МЕНЮ" heading and neon-menu's guest badge).
- Fix cream-elegance's category icons: the emoji glyph was never
  actually passed into iconCircle, so the icon circles rendered empty.
- Even out cream-elegance's bottom row (stat cards vs price band had
  mismatched heights).
- Load distinctive Cyrillic-friendly type pairs instead of default
  Arial/Georgia: Playfair Display + Montserrat for cream-elegance,
  Unbounded + Manrope for neon-menu, awaited via the Font Loading API
  before each render so text never draws in the fallback face.
- Narrow the Settings gallery to just these two templates per request
  ("остановимся на 2х пдф пока"); the other 4 signature designs and
  the original 13 classic templates stay intact and renderable for any
  order that already used one, just not offered for new ones.

Verified via a local static server (public/, http-server) with a real
uploaded box photo run through window.SunSignatureOfferPDFV18 and the
production sunClientOfferDebugPdfPages pipeline directly — 3 pages,
no duplicate cover, both fonts confirmed loaded via document.fonts.check.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-16 08:49:39 +03:00
pavlov346346-source
90482d0e7d fix: stop signature PDF pages from double-rendering a cover
renderOfferPdfPages routed the signature templates' inner pages back
through the classic module's own renderPages, which drew its own
extra cover page on top of the real content pages -- doubling the
render work and producing an extra page. Route straight to the plain
base renderer instead. Also await the gourmet-hero template's photo
cards instead of firing them off unawaited.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 18:42:32 +03:00
pavlov346346-source
b92b52e03e feat: add 6 new client-offer PDF templates, archive the old 13
New "signature" template pack (cream-elegance, neon-menu,
emerald-circles, midnight-checklist, gourmet-hero, diamond-gold)
replaces the visible template gallery in Settings. The previous 13
classic/archive templates keep rendering correctly for any existing
order that already used one, but are no longer selectable for new
orders — nothing was deleted.

Also adds a Settings option to upload a custom logo and company name
for PDF documents, replacing the hardcoded "Солнце Кейтеринг" branding
wherever a logo fails to load.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 18:27:23 +03:00
pavlov346346-source
3610927a33 fix: restore write permissions in local-only mode
RBAC permission checks (has()) always deferred to the cloud
workspace's role, which is null when using "work locally without
internet" — so every guarded action (save/delete order, edit catalog,
etc.) was blocked with "no permission" even though there is no
workspace to restrict against. Local-only mode now grants full access,
matching how nav permissions already behave with no cloud session.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 17:49:05 +03:00
pavlov346346-source
26681195b0 fix: accept emergency export format in Settings backup restore
The Settings "load from file" button only understood its own
sun-catering-backup format. Extend it to also read the
caterium-full-export format produced by the browser-console
emergency export (localStorage + IndexedDB), so an already-downloaded
export file can be restored directly through the UI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 17:30:31 +03:00
pavlov346346-source
345ee8e052 feat: add JSON file backup export/import to Settings
Lets users download the local database as a JSON file and restore it
from a file, independent of cloud sync — needed while Supabase is
unreachable to move data between computers or recover after an outage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 17:29:32 +03:00
pavlov346346-source
98ba823f16 merge: reconcile production promo-code work with main
Bring the 13 commits pushed directly to production (trial promo
codes, owner onboarding, service worker/PWA cache fixes, auth
proxy fallback) back into main, so the two branches share one
history again. The direct-to-production pushes had diverged from
main, which silently broke the auto-promote pipeline (plain
non-force push rejected as non-fast-forward).
2026-09-15 17:07:07 +03:00
pavlov346346-source
caa13eca59 feat: add "work locally without internet" option to login gate
When Supabase is unreachable, employees were stuck on the login
screen with no way in, even though the app is fully usable offline
(orders, catalog, stock, etc. all live in localStorage already).

Adds a low-key link on the login screen that sets a local-only flag
and skips the auth gate entirely until a real cloud sign-in succeeds
(which clears the flag). Deliberately does not touch any cloud/session
state, so it can't trigger an automatic cloud pull that would overwrite
data created while working offline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 16:57:56 +03:00
pavlov346346-source
79b470d03f fix: fall back to direct Supabase auth on proxy 500 2026-09-14 17:26:32 +03:00
pavlov346346-source
708b90e87d fix: align safe service worker with release cache guard 2026-09-14 17:10:16 +03:00
pavlov346346-source
30a534b67f fix: keep safe navigation compatible with release guard 2026-09-14 17:01:37 +03:00
pavlov346346-source
5b827b4e09 fix: reopen app after persisted login session 2026-09-14 16:57:45 +03:00
pavlov346346-source
0249734252 fix: stop service worker from rewriting app HTML 2026-09-14 16:43:56 +03:00
pavlov346346-source
74a6261d5b test: syntax-check trial promo module 2026-09-14 16:39:41 +03:00
pavlov346346-source
77485cafca fix: keep promo onboarding server-authoritative 2026-09-14 12:23:00 +03:00
pavlov346346-source
e6fff9e58d fix: restore validated PWA cache key for onboarding release 2026-09-14 12:07:10 +03:00
pavlov346346-source
b09276f2fc Add v17.8.2 owner workspace onboarding migration 2026-09-14 10:57:45 +03:00
pavlov346346-source
9d38b5550b Fix company owner and employee onboarding 2026-09-14 10:57:28 +03:00
pavlov346346-source
f514b22798 feat: load trial promo developer UI in production PWA 2026-09-14 02:49:05 +03:00
pavlov346346-source
afb502c345 feat: add trial promo management to developer console 2026-09-13 18:44:18 +03:00
pavlov346346-source
170c078998 feat: require trial promo code during Caterium signup 2026-09-13 18:43:54 +03:00
pavlov346346-source
834557e865 fix: show real error text instead of "[object Object]" in auth gate
String(err) on a plain object (a PostgrestError-shaped object without a
.message, or any non-Error rejection) renders as the literal string
"[object Object]" with no useful information. Added errText() that
prefers err.message, falls back to JSON-stringifying the object, and
only then falls back to a generic message - and applied it to the three
catch blocks in the login/company-creation gate flow (auth(), the
pending-registration finisher, and the "retry workspace access" button),
which is what surfaced the raw "[object Object]" during login.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 17:30:17 +03:00
pavlov346346-source
fe029715eb ops: add api.caterium.ru proxy script to repo, fix auth CORS
The deployed PHP reverse proxy at api.caterium.ru only forwarded/allowed
a fixed set of CORS request headers, missing x-supabase-api-version which
supabase-js v2.112.4's auth client sends on every request. That made the
browser reject the preflight and fail the actual login call client-side
with a generic "Failed to fetch" (not a server error, so it never showed
up in server logs) - every login was broken since the proxy went live.

Fixed on the live server and committed the previously SCP-only script
here so future edits go through git instead of being SSH-only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 17:08:58 +03:00
pavlov346346-source
5d73b2c37e Route Supabase REST/Auth/Storage/Functions traffic through api.caterium.ru proxy
The api.caterium.ru PHP reverse proxy has been deployed and verified end-to-end
(curl tests plus live authenticated RPC calls through a real browser session).
This switches the client's Supabase fetch calls to go through the proxy so
requests from Russia work without a VPN. Realtime's WebSocket connection is
unaffected since it doesn't go through fetch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 02:50:37 +03:00
pavlov346346-source
aafad18d6a fix: remove the racy forced password-change gate for new employees
showPasswordChangeGate() replaced the auth gate's content and returned,
but the same login also fires onAuthStateChange, which kicks off
loadMemberships() independently. Once that resolved (workspace found),
ensureAuthGate()'s periodic poll (every 5s, plus assorted event-driven
calls) saw signedIn+workspace and tore the gate down immediately,
regardless of whether a password-change form was currently blocking
it - the employee would see the "create a new password" screen flash
and vanish before they could use it, dropping them straight into the
app still on their temporary password.

Removes the forced gate entirely (mustChangePassword/
showPasswordChangeGate) and adds a "Пароль" box to the account
settings card instead, so changing your password is a deliberate,
always-available action rather than a one-shot dialog racing the rest
of the login flow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 01:59:36 +03:00
pavlov346346-source
4afde880d2 revert: back out the api.caterium.ru fetch rewrite for now
The previous commit accidentally carried over an uncommitted proxy
cutover (supabaseProxyFetch wired into createClient's global.fetch)
that was left sitting in the working tree from an earlier, paused
verification session - it was never meant to ship without first
completing the full checklist (auth, clients, orders, Storage,
Functions) against the live proxy. Reverting just that piece so
main goes back to calling cksuehzcimitsxmeloes.supabase.co directly,
keeping the "Загрузить из облака" button fix from the same commit.
The proxy cutover will come back once it's actually been verified
end-to-end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 18:37:56 +03:00
pavlov346346-source
38a4ba47eb fix: restore the missing "Загрузить из облака" button in settings
bindCloudUI() already wires a click handler on #sunCloudPullV2
(confirm dialog -> pullRemote({replace:true, quiet:false}), which
backs up the local copy and force-replaces it with the server's
orders/clients/etc.), but renderCloudUI()'s template never actually
emitted a button with that id - the handler was permanently a no-op.
Adds the missing button to the "Профиль и аккаунт" settings card.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 18:35:20 +03:00
pavlov346346-source
5427b71651 fix: wrap catalog category pills on mobile instead of horizontal scroll
@media(max-width:720px) forced .sun-catalog-top-toolbar .cats into
flex-wrap:nowrap + overflow:auto, turning the colored category pills
(Боксы/Премиум/Напитки/Дополнения/Посуда...) into a horizontally
scrolling strip that runs off the right edge of the screen instead of
wrapping.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 18:20:41 +03:00
pavlov346346-source
870cc405dc fix: keep catalog toolbar buttons together on mobile
The previous mobile fix put the title on its own row but left the
search input as a regular flex item (flex:1 1 140px) among PDF/
"Вкладки"/"Меню". Since it greedily grows to fill whatever line it
lands on, it still forced PDF onto its own line, then itself onto the
next, then the two remaining buttons onto a third - three staggered
rows instead of the intended toolbar.

Gives the search input its own full-width row (flex-basis:100%,
order:0) and puts all catalog-head buttons (PDF, "Вкладки", "Меню") on
the next row together, sharing it evenly (flex:1 1 0) so they land on
one level instead of scattering.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 18:06:13 +03:00
pavlov346346-source
edfce3b7e6 fix: pre-apply cached brand/sidebar theme before first paint
The static :root fallback for --sun-ui-*/--sun-sidebar-* hardcodes the
"Standard Purple" preset (SIDEBAR_STANDARD's exact values). Any
workspace that has actually saved a different theme only gets it
applied once app-runtime.js's brand-theme module loads and runs
applyActual(), which reads the same localStorage cache
(sunBrandThemeV1) it always did - but by then the purple/mixed
defaults have already painted, so every load flashes the wrong colors
before snapping to the real ones.

Reads the same localStorage key synchronously in the
sun-startup-stability-guard script (already first in <head>, before
any stylesheet or the app-runtime.js bundle loads) and sets the same
CSS custom properties as inline styles on <html>. Inline element
styles always win over a stylesheet's :root selector regardless of
load order, so the correct theme is already active for the very first
paint. Workspaces with no saved theme yet are unaffected - the
existing static fallback still shows, same as today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 17:56:19 +03:00
pavlov346346-source
1af9733154 fix: restore search/notification icons and catalog toolbar on mobile
The sidebar's search and notification button icons are drawn entirely
by mask-image rules scoped to @media(min-width:901px) (the "enterprise
sidebar" redesign styling). The existing mobile block
(@media(max-width:900px)) predates that redesign and only hides the
button labels via font-size:0 - it never defined a mobile equivalent
of the icon rules, so on phones the buttons rendered with literally
nothing visible inside them: no text (hidden), no icon (never defined
for this breakpoint).

Adds a second @media(max-width:900px) block with the same mask-image
icons for #sunGlobalSearchBtn/#sunNotificationsBtn.

Also fixes the catalog toolbar (PDF / search / "Вкладки" / "Меню"):
on narrow screens flex-wrap put the title, buttons, and a
min-width:180px search input on uneven wrapped lines with no
consistent baseline. The title now takes its own full-width line
(order:-1, flex-basis:100%), the search input can shrink instead of
forcing overflow, and the toolbar buttons get an explicit
align-self:center so they land on one level together.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 17:45:31 +03:00
pavlov346346-source
09d54682c2 fix: add timeout and error handling to loadMemberships
Every other cloud RPC call goes through sunCloudAwait (12s timeout),
but loadMemberships() (which resolves which workspace to open right
after login, showing "Загружаю рабочую базу...") called client.rpc/
.from directly with no timeout and no catch. A single slow or dropped
request left the auth gate stuck on that message forever instead of
surfacing a retryable error - there's already a "Проверить ещё раз"
button wired to reloadMemberships(), but nothing ever told the user
they needed to press it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 15:50:04 +03:00