Commit Graph

38 Commits

Author SHA1 Message Date
Ruslan Bakiev
c229bdee23 fix(calendar): restore GSAP fly-rect + fly-label animation in useCalendar composable
The refactoring in a4d8d81 moved calendar logic into useCalendar.ts but
used the old CSS-transform animation code instead of the GSAP-based
flying rect + flying label implementation. This restores:

- GSAP-based animateCalendarZoomIntoSource and animateCalendarFlipTransition
- Flying label that animates from card title → toolbar on zoom-in and back
- Clone-and-swap pattern with skeleton content in fly-rect (no text)
- Fly-rect/fly-label refs and setters now live in the composable
- isoWeekNumber() and weekNumber field on monthRows
- Sibling card titles and week numbers faded during zoom
- Removed old CSS-transform camera state and calendarSceneTransformStyle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:50:35 +07:00
Ruslan Bakiev
3775d881f9 fix: pass selectedCommThreadId to refreshSelectedClientTimeline
The function was called without arguments in two places, causing
contactId to be empty string and clearing clientTimelineItems to [].
Messages disappeared from the chat panel as a result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:45:19 +07:00
Ruslan Bakiev
195df8e16a fix: stop aggressive 2s chat polling, use WebSocket instead
- Add refetchChatMessages + refetchChatConversations to
  refetchAllCrmQueries so WebSocket dashboard.changed events
  cover pilot chat updates
- Reduce background polling from 2s to 30s (fallback only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:41:58 +07:00
Ruslan Bakiev
d892d0c604 refactor: distribute types from crm-types.ts to owning composables
Each composable now owns its types and exports them. Other composables
import types from the owning composable. Deleted centralized crm-types.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:21:30 +07:00
Ruslan Bakiev
a4d8d81de9 refactor: decompose CrmWorkspaceApp.vue into 15 composables
Split the 6000+ line monolithic component into modular composables:
- crm-types.ts: shared types and utility functions
- useAuth, useContacts, useContactInboxes, useCalendar, useDeals,
  useDocuments, useFeed, useTimeline, usePilotChat, useCallAudio,
  usePins, useChangeReview, useCrmRealtime, useWorkspaceRouting
CrmWorkspaceApp.vue is now a thin orchestrator (~2500 lines) that
wires composables together with glue code, keeping template and
styles intact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:05:01 +07:00
Ruslan Bakiev
e5ad3809e0 feat(calendar): flying label animation from card title to toolbar on zoom
The label (month name, week number, day label) now animates from its
position above the source card to the toolbar center on zoom-in, and
flies back from toolbar to the target card title on zoom-out. The
fly-rect rectangle no longer contains text — only skeleton placeholder
lines. Sibling card titles and week numbers also fade during zoom.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:03:16 +07:00
Ruslan Bakiev
9505cecab2 feat(calendar): header continuity with week numbers + skeleton content in fly-rect
- Add ISO week numbers to the left of week rows in month view (8, 9, 10...)
  with spacer alignment on day-of-week headers
- Inject label + skeleton placeholder lines into fly-rect during zoom animations:
  zoom-in shows source label (month name / "Week N" / day name) + pulsing bars
  zoom-out shows target context label + skeleton
- Skeleton CSS uses pulse animation (0.8s alternate) for loading hint
- Non-scoped style block for dynamically injected innerHTML elements
- isoWeekNumber helper for ISO 8601 week calculation
- Extended MonthRow type with weekNumber property

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:28:31 +07:00
Ruslan Bakiev
77141978c5 feat(calendar): seamless zoom animation with clone-and-swap + full-area coverage
Zoom-in: fade siblings → fade source content → clone source style to fly-rect →
hide source → animate fly-rect to viewport → switch view → fade in new content.

Zoom-out: fade scene → show fly-rect at viewport → switch view → clone target
style → animate fly-rect to target → fade in scene.

Full-area: all views (month/week/day) now fill 100% of container height.
Month grid rows stretch equally, day cells fill row height, depth layers flex.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:56:42 +07:00
Ruslan Bakiev
227030b9ae feat(calendar): replace CSS-transform zoom with GSAP flying-rect animation and scope data to year
- Add CalendarDateRange input to GraphQL schema; server resolver now accepts from/to params
- Frontend query sends year-scoped date range variables reactively
- Rewrite zoom-in/zoom-out animations using GSAP flying-rect overlay (650ms vs 2400ms)
- Add flying-rect element to CrmCalendarPanel with proper CSS
- Remove old calendarSceneTransformStyle CSS-transition approach
- Add calendarKillTweens cleanup in onBeforeUnmount

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:41:35 +07:00
Ruslan Bakiev
f553c26931 fix: add browserHttpEndpoint for client-side Apollo requests
The Apollo Client was using httpEndpoint (http://localhost:3000/api/graphql)
for browser requests, which fails on remote servers. Added browserHttpEndpoint
as relative URL "/api/graphql" so browser requests go to the correct origin.
Also added error logging to setInboxHidden mutation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:40:08 +07:00
Ruslan Bakiev
947ef4d56d refactor: migrate CRM data layer from manual gqlFetch to Apollo Client
Replace custom gqlFetch() with proper Apollo useQuery/useMutation hooks
powered by codegen-generated TypedDocumentNode types. Key changes:

- Add GraphQL SDL schema file and codegen config for typescript-vue-apollo
- Replace all 28 raw .graphql imports with generated typed documents
- Add 12 useQuery() hooks with cache-and-network fetch policy
- Add 17 useMutation() hooks with surgical refetchQueries per mutation
- Optimistic cache update for setContactInboxHidden (instant archive UX)
- Fix contact list subtitle: show lastText instead of channel name
- Migrate login page from gqlFetch to useMutation
- WebSocket realtime now calls Apollo refetch instead of full data reload

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:07:35 +07:00
Ruslan Bakiev
c5d3a90413 refactor(voice): extract chat dictation into reusable component 2026-02-23 19:43:00 +07:00
Ruslan Bakiev
c1e8f912d1 fix(communications): restore voice dictation in message composer 2026-02-23 19:34:39 +07:00
Ruslan Bakiev
faea65dfcb style(communications): show call play button only on waveform hover 2026-02-23 19:21:54 +07:00
Ruslan Bakiev
2e1014d726 style(communications): center play control on call waveform 2026-02-23 18:44:35 +07:00
Ruslan Bakiev
5fb8113ed7 feat(communications): add play/pause for call voice messages 2026-02-23 18:42:21 +07:00
Ruslan Bakiev
94c01516ba precompute call waveforms and stop list-time audio loading 2026-02-23 16:02:57 +07:00
Ruslan Bakiev
0bbeef5594 fix(calendar): scope zoom selectors by layer and stretch week days to full height 2026-02-23 15:32:52 +07:00
Ruslan Bakiev
df8c06d313 refactor(review): rollback-only flow and compact change summary 2026-02-23 15:28:46 +07:00
Ruslan Bakiev
ec94dd6e2a fix(calendar): zoom selected block first, then commit level 2026-02-23 14:56:11 +07:00
Ruslan Bakiev
60b9bb9fd1 remove contact company/country/location across db and ui 2026-02-23 14:52:26 +07:00
Ruslan Bakiev
f6b738352b fix(calendar): use full available calendar viewport height on desktop 2026-02-23 14:40:59 +07:00
Ruslan Bakiev
db49c4a830 fix(calendar): make nested block zoom smooth in both directions 2026-02-23 14:33:24 +07:00
Ruslan Bakiev
6ad53e64c5 feat(documents): delete document from context menu 2026-02-23 14:27:00 +07:00
Ruslan Bakiev
68cbe7bc64 fix(chat-ui): move source settings to thread header 2026-02-23 14:24:58 +07:00
Ruslan Bakiev
a19ba07baa fix(chat-ui): align voice cards by message direction 2026-02-23 12:52:33 +07:00
Ruslan Bakiev
894210cd42 fix(calendar): remove overlay swap and keep in-place zoom flow 2026-02-23 12:50:11 +07:00
Ruslan Bakiev
d3b751db65 refactor(graphql): replace dashboard query with resource queries 2026-02-23 12:46:29 +07:00
Ruslan Bakiev
aa465f65bd feat(workspace): add hidden contacts filter and remove calendar scene swap 2026-02-23 12:38:30 +07:00
Ruslan Bakiev
c94c229a1a fix: avoid pilot sidebar trim crash on input prop 2026-02-23 12:03:51 +07:00
Ruslan Bakiev
43960d0374 feat(auth): enforce login route with global middleware 2026-02-23 12:01:03 +07:00
Ruslan Bakiev
5918a0593d fix(workspace): guard trim calls against undefined data 2026-02-23 11:51:55 +07:00
Ruslan Bakiev
8be6e7d581 refactor(workspace): extract communications sidebars 2026-02-23 11:44:53 +07:00
Ruslan Bakiev
82bc5dd04e refactor(frontend): extract calendar scene into workspace component 2026-02-23 11:35:57 +07:00
Ruslan Bakiev
d5f7280297 refactor(frontend): extract pilot sidebar into workspace component 2026-02-23 11:30:49 +07:00
Ruslan Bakiev
2b72d42956 refactor(frontend): split documents and review into workspace components 2026-02-23 11:22:05 +07:00
Ruslan Bakiev
47ed805ac7 refactor(frontend): extract auth and topbar workspace components 2026-02-23 11:15:29 +07:00
Ruslan Bakiev
e5030a321f refactor(nuxt): split CRM into page routes and workspace shell 2026-02-23 11:09:59 +07:00