-
Notifications
You must be signed in to change notification settings - Fork 50
feat: simplify onboarding #1404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 42 commits
Commits
Show all changes
145 commits
Select commit
Hold shift + click to select a range
1cc66ae
feat(web): add tests for onboarding improvements
tyler-dane bcd9704
fix(web): skip task seeding in test environment
tyler-dane 6cf674d
fix(web): fix test for cmd+k keyboard event handling
tyler-dane 367fd91
fix(backend): prevent duplicate instance when COUNT is specified in r…
tyler-dane c714c57
refactor(web): extract onboarding useEffects into separate custom hooks
tyler-dane 889f94a
fix(web): fix failing onboarding tests
tyler-dane 82e4fe2
feat(web): implement command palette guide for onboarding
tyler-dane 64a29d8
feat(web): enhance onboarding with command palette guide tests
tyler-dane 92b182a
refactor(web): remove OnboardingOverlay component and integrate CmdPa…
tyler-dane b94777b
feat(web): enhance onboarding guide with step completion tracking
tyler-dane f151324
feat(web): refactor onboarding storage management and enhance progres…
tyler-dane bb54bf1
feat(web): update CmdPaletteGuide to display contextual welcome messages
tyler-dane 1559e68
feat(web): extend CmdPaletteGuide with step 4 and enhance onboarding …
tyler-dane e5b122c
feat(web): refactor onboarding steps to use constants for improved cl…
tyler-dane d5cf873
feat(web): enhance onboarding experience with new steps and improved …
tyler-dane 410794c
refactor(web): standardize onboarding storage utilities and improve s…
tyler-dane c4fd05c
fix(web): update CmdPaletteGuide step counts and remove deprecated step
tyler-dane b972901
feat(web): integrate CmdPaletteGuide into CalendarView and enhance su…
tyler-dane 5ac651d
feat(web): integrate CmdPaletteGuide into AuthenticatedLayout and enh…
tyler-dane 5cc9ad4
Merge branch 'main' into feat/onboarding
tyler-dane 77b0ba9
Update packages/web/src/auth/UserProvider.tsx
tyler-dane 3601507
fix(web): address PR review comments for onboarding flow
tyler-dane 811ab9f
refactor(web): improve useAuthPrompt and extract useUser hook
tyler-dane 701a39a
chore: revert `gcal.event.rrule.ts`
tyler-dane 895c81f
chore: add dexie and dexie-react-hooks dependencies to package.json
tyler-dane 64d91b2
chore: add baseline-browser-mapping and fake-indexeddb dependencies t…
tyler-dane 5ba256a
feat(web): enhance event creation saga for unauthenticated users
tyler-dane 9e083f0
feat(web): add unit tests for getUserId function in auth.util
tyler-dane eeb824f
feat(web): implement IndexedDB storage for events and enhance saga fo…
tyler-dane 5f6205d
test(web): enhance tests for Sidebar interactions and session handling
tyler-dane bac8b27
feat(web): implement EventRepository with local and remote storage ha…
tyler-dane eb7ed12
feat(web): add event repository utilities for local and remote storage
tyler-dane 18b7a52
refactor(tests): remove Calendar.render.test.tsx file
tyler-dane f1adaa8
feat(tests): add unit tests for LocalEventRepository and LocalTaskRep…
tyler-dane d322254
Update packages/web/src/routers/loaders.ts
tyler-dane 5351e68
fix(tests): remove showCmdPaletteTutorial from useAuthPrompt test
tyler-dane cac83ab
Update packages/web/src/common/repositories/event/event.repository.in…
tyler-dane d8b7a96
feat(tests): refactor Jest configuration to support multiple projects
tyler-dane e1eebd3
feat(onboarding): implement DayOnboardingOverlays component and relat…
tyler-dane 92c5ef6
feat(onboarding): integrate onboarding overlays and related components
tyler-dane 83ada8a
feat(onboarding): enhance CmdPaletteGuide with dynamic instructions a…
tyler-dane 38139f8
feat(onboarding): introduce NAVIGATE_TO_DAY step and update onboardin…
tyler-dane 7148725
refactor(onboarding): streamline CmdPaletteGuide and onboarding step …
tyler-dane 07a4d82
refactor(event): remove isOptimistic flag from event handling
tyler-dane cd921a6
refactor(event): simplify event saga by removing unauthenticated user…
tyler-dane 739fa8a
feat(auth): add AUTH_PROMPT_DISMISSED key to local storage management
tyler-dane 6c7464a
feat(auth): refactor local storage management for authentication states
tyler-dane cf2f477
feat(auth): implement useIsSignupComplete hook and refactor onboardin…
tyler-dane 5a9d041
Merge branch 'main' into feat/onboarding
tyler-dane e40ca95
feat(auth): update authentication flow to redirect to Day view
tyler-dane 76cb0fe
feat(event): refactor event editing to utilize session and repository
tyler-dane 9a612d4
refactor(event): update event repository methods and remove unused Re…
tyler-dane 4d6cfb5
feat(sync): implement event syncing and enhance session management
tyler-dane 01d1b8e
feat(database): initialize database before application startup and en…
tyler-dane 05b7b0e
fix(web): ensure events display and can be edited
tyler-dane d2fd159
refactor(auth): update AuthPrompt text and onboarding notices
tyler-dane ef4667c
refactor(event): enhance event fetching logic with detailed logging a…
tyler-dane f0ccfb5
feat(onboarding): introduce onboarding progress schema and default state
tyler-dane 12ccd37
feat(auth): enhance authentication state management with Zod validation
tyler-dane 3ed7c68
test(e2e): add passing CRUD tests, part I
tyler-dane 0ac9183
test(e2e): adding failing e2e tests (skipped)
tyler-dane c588194
chore: update playwright config with TEST_PORT
tyler-dane 6bb0e2a
chore: update playwright and webpack configs for e2e tests
tyler-dane a2d4098
fix(a11y): update web for expected behavior
tyler-dane 3e5e37c
fix(test): add isMobile skip
tyler-dane 964dc28
chore(config): update web server command for development environment
tyler-dane a4cace0
chore(config): change default port for web server to 9080
tyler-dane dca5f6d
feat(auth): integrate Google Calendar login in command palettes
tyler-dane 37d1ffa
refactor(auth): streamline Google Calendar sync process and update UI…
tyler-dane ddc5928
feat(auth): implement session management and enhance authentication c…
tyler-dane 56d1337
refactor(event): remove console logs from event repository and authen…
tyler-dane 75fc3f4
fix(api): enhance error handling for /user/profile 404 responses
tyler-dane 85adcdc
test(tasks): add regression test to prevent localStorage overwrite on…
tyler-dane 15c8a78
refactor(storage): remove logging functions and streamline database e…
tyler-dane 7a1893a
feat(calendar): enhance Google Calendar import functionality and UI
tyler-dane 2dfe7e0
feat(app): enhance database initialization and error handling
tyler-dane b3476ea
feat(app): improve database initialization and error handling
tyler-dane 9d51126
test(sync): enhance SyncController tests to validate import result st…
tyler-dane 0abc2dd
fix(config): update port configuration for web server
tyler-dane 700ce5b
feat(tests): enhance event test utilities with retry logic and timeou…
tyler-dane 217dd69
feat(auth): implement UserContext and UserProvider for user state man…
tyler-dane 5904478
feat(auth): introduce useSession hook for session management
tyler-dane b5b6885
feat(modal): add CalendarImportCompleteModal component and associated…
tyler-dane f15c1d1
refactor(checkbox): remove CheckBox component and associated files
tyler-dane dd7ec2b
fix(sagas): improve error handling in event sagas and update imports
tyler-dane 2da6826
refactor(sagas): enhance type safety and simplify action handling
tyler-dane 491220d
fix(loaders): integrate task seeding for initial date setup
tyler-dane a846208
refactor(login): remove Login component and styles; update Logout view
tyler-dane 5598452
refactor(NotFound): remove unused React import; update task tests to …
tyler-dane 22789a5
refactor(AuthenticatedLayout): remove CalendarImportOverlay and strea…
tyler-dane 61da56a
feat(date): add isDateRangeOverlapping utility function and correspon…
tyler-dane 059cc68
refactor(saga.util): simplify event filtering logic in EventDateUtils
tyler-dane a023560
refactor(storage): remove task seeding utility and related tests
tyler-dane 6c9fb0f
test(useTasksToday): update task loading and storage mock behavior
tyler-dane cc94421
fix(webpack): change host from 127.0.0.1 to localhost for better comp…
tyler-dane efec135
refactor(SyncEventsOverlay): update sync message for clarity and remo…
tyler-dane f0bf56d
feat(DayCmdPalette): implement Google Calendar authentication status …
tyler-dane 122eb45
refactor(DayViewContent): remove StorageInfoModal and related context
tyler-dane ee33602
refactor(Onboarding): remove CmdPaletteTutorial and OnboardingOverlay…
tyler-dane 3093d8b
feat(Onboarding): enhance CmdPaletteGuide with new components and logic
tyler-dane fff5370
feat(Onboarding): add "Connect Google Calendar" step to onboarding pr…
tyler-dane c418eb1
feat(Onboarding): enhance GuideInstructionContent with meta-key support
tyler-dane 947708c
feat(GoogleAuth): refactor authentication logic and add utility funct…
tyler-dane bd48d59
feat(CmdPalette): integrate useGoogleAuth for improved authentication…
tyler-dane 6197900
feat(SyncEventsOverlay): enhance OAuth phase messaging and logic
tyler-dane 935d293
feat(CalendarImport): enhance import completion messaging and introdu…
tyler-dane 8bfb35c
refactor(CalendarImportCompleteModal, OverlayPanel): streamline butto…
tyler-dane f6f2bed
feat(GoogleLogin): implement useGoogleLoginWithSyncOverlay for enhanc…
tyler-dane 70be161
fix(useGoogleAuth): improve authentication failure handling and synci…
tyler-dane 21f76ef
refactor(useGoogleAuth, SocketProvider, DayCmdPalette): streamline au…
tyler-dane a59ef20
feat(storage): introduce CompassTasksSavedEvent for task synchronization
tyler-dane 20222bd
refactor(onboarding): remove isStorageWarningSeen from onboarding con…
tyler-dane e3d1914
fix(onboarding): update onboarding steps and remove EDIT_DESCRIPTION
tyler-dane 1ca6efa
fix(onboarding): update onboarding steps to reflect removal of EDIT_R…
tyler-dane b08540c
fix(onboarding): update CmdPaletteGuide instructions for clarity
tyler-dane 373bb5e
feat(tests): add end-to-end tests for OAuth overlay functionality
tyler-dane 214c794
feat(tests): enhance SocketProvider tests for import event handling
tyler-dane 47e1487
refactor(tests): replace direct body lock checks with utility functions
tyler-dane 9c7d3bd
refactor(onboarding): remove isSeen property from onboarding state
tyler-dane 17bb59e
feat(socket): implement SocketProvider and related hooks for event sy…
tyler-dane f386e6d
refactor(google-auth): clean up useGoogleAuth hook and remove unused …
tyler-dane c1b3b9f
feat(google-auth): enhance useGoogleLoginWithSyncOverlay for better s…
tyler-dane 7ebaa22
feat(state): add pendingLocalEventsSynced to importGCal state
tyler-dane 7f8ea0d
feat(session): mark user as authenticated on session existence and re…
tyler-dane 1f67418
refactor(oauth): remove unused body lock and overlay phase utility fu…
tyler-dane dfe41a7
refactor(tests): rename test for overlay phase verification
tyler-dane af88ce7
refactor(tests): centralize onboarding state in test-constants
tyler-dane b6c89d0
feat(google-auth): improve error handling in useGoogleAuth and useGoo…
tyler-dane b9c34c1
feat(google-auth): retain isSyncing state on remount when configured
tyler-dane c68f568
refactor(routers): update loaders and routes for onboarding status
tyler-dane 9189358
refactor(onboarding): remove onboarding flow and related routes
tyler-dane 18ec635
feat(google-auth): streamline useGoogleAuth and useGoogleLoginWithSyn…
tyler-dane 8bf7de3
feat(google-auth): implement useConnectGoogle hook for Google Calenda…
tyler-dane 862cd4f
feat(auth): introduce Google authentication hooks and related tests
tyler-dane 51507a5
feat(google-auth): refactor Google authentication hooks and add tests
tyler-dane 6171dfd
feat(auth): implement authentication state management with Redux
tyler-dane f79f889
feat(sync): enhance SyncEventsOverlay to include authentication state
tyler-dane 1fb3013
feat(visibility): implement useBufferedVisibility hook to prevent UI …
tyler-dane ab6f788
feat(sync): enhance Google Calendar import flow with new state manage…
tyler-dane 16dc25d
feat(onboarding): update GuideProgressIndicator to conditionally rend…
tyler-dane a70ce61
refactor(tests): remove unused createTestEvents function from reposit…
tyler-dane f5d55f2
refactor(tests): remove useTaskRepository hook and its associated tests
tyler-dane b85426d
refactor(tests): remove LocalTaskRepository test file
tyler-dane 84a2135
refactor(tests): update OAuth overlay tests and utility functions
tyler-dane 080fcdc
refactor(tests): remove LocalEventRepository test file
tyler-dane File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
packages/web/src/__tests__/utils/repositories/repository.test.factory.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| import { Origin, Priorities } from "@core/constants/core.constants"; | ||
| import { Event_Core } from "@core/types/event.types"; | ||
| import dayjs from "@core/util/date/dayjs"; | ||
| import { createMockStandaloneEvent } from "@core/util/test/ccal.event.factory"; | ||
| import { Task } from "@web/common/types/task.types"; | ||
|
|
||
| /** | ||
| * Factory function to create a test Event_Core with sensible defaults. | ||
| * @param overrides - Partial event properties to override defaults | ||
| * @returns A complete Event_Core object | ||
| */ | ||
| export const createTestEvent = ( | ||
| overrides: Partial<Event_Core & { order?: number }> = {}, | ||
| ): Event_Core & { order?: number } => { | ||
| const dateStr = dayjs().format(dayjs.DateFormat.YEAR_MONTH_DAY_FORMAT); | ||
| return { | ||
| _id: `event-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, | ||
| title: "Test Event", | ||
| startDate: dateStr, | ||
| endDate: dateStr, | ||
| origin: Origin.COMPASS, | ||
| priority: Priorities.UNASSIGNED, | ||
| user: "user-1", | ||
| ...overrides, | ||
| }; | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create multiple test events. | ||
| * @param count - Number of events to create | ||
| * @param overrides - Partial event properties to override defaults (applied to all events) | ||
| * @returns Array of Event_Core objects | ||
| */ | ||
| export const createTestEvents = ( | ||
| count: number, | ||
| overrides: Partial<Event_Core> = {}, | ||
| ): Event_Core[] => { | ||
| return Array.from({ length: count }, (_, index) => | ||
| createTestEvent({ | ||
| ...overrides, | ||
| _id: overrides._id || `event-${index + 1}`, | ||
| title: overrides.title || `Event ${index + 1}`, | ||
| }), | ||
| ); | ||
| }; | ||
tyler-dane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * Factory function to create a test CompassCoreEvent (for edit operations). | ||
| * Uses the existing factory from @core/util/test/ccal.event.factory. | ||
| * @param overrides - Partial event properties to override defaults | ||
| * @returns A complete event object compatible with CompassCoreEvent | ||
| */ | ||
| export const createTestCompassEvent = ( | ||
| overrides: Parameters<typeof createMockStandaloneEvent>[0] = {}, | ||
| ) => { | ||
| return createMockStandaloneEvent(overrides); | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create a test Task with sensible defaults. | ||
| * @param overrides - Partial task properties to override defaults | ||
| * @returns A complete Task object | ||
| */ | ||
| export const createTestTask = (overrides: Partial<Task> = {}): Task => { | ||
| return { | ||
| id: `task-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, | ||
| title: "Test Task", | ||
| status: "todo", | ||
| order: 0, | ||
| createdAt: new Date().toISOString(), | ||
| ...overrides, | ||
| }; | ||
| }; | ||
|
|
||
| /** | ||
| * Factory function to create multiple test tasks. | ||
| * @param count - Number of tasks to create | ||
| * @param overrides - Partial task properties to override defaults (applied to all tasks) | ||
| * @returns Array of Task objects | ||
| */ | ||
| export const createTestTasks = ( | ||
| count: number, | ||
| overrides: Partial<Task> = {}, | ||
| ): Task[] => { | ||
| return Array.from({ length: count }, (_, index) => | ||
| createTestTask({ | ||
| ...overrides, | ||
| id: overrides.id || `task-${index + 1}`, | ||
| title: overrides.title || `Task ${index + 1}`, | ||
| order: overrides.order !== undefined ? overrides.order : index, | ||
| }), | ||
| ); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { createContext } from "react"; | ||
| import { UserProfile } from "@core/types/user.types"; | ||
|
|
||
| export const UserContext = createContext< | ||
| | Partial< | ||
| { isLoadingUser: boolean; userId: string } & Omit<UserProfile, "_id"> | ||
| > | ||
| | undefined | ||
| >(undefined); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.