Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
7675212
refactor: standardize import formatting and improve code readability …
dani-vaibhav Nov 5, 2025
0404a49
Initial plan
Copilot Nov 5, 2025
815cd1f
feat: implement dynamic action buttons based on reservation request s…
Copilot Nov 5, 2025
8eba1a5
feat: implement acceptReservationRequest mutation and integrate with UI
Copilot Nov 5, 2025
1f8a9c4
feat: enhance MyListingsDashboard and RequestsTable with sharerId pro…
dani-vaibhav Nov 6, 2025
c3b3d3c
feat: enhance reservation request handling with improved state mappin…
dani-vaibhav Nov 7, 2025
fde5275
feat: update MyListingsDashboard to use sharerId for requests count a…
dani-vaibhav Nov 7, 2025
9618ccd
Dummy change
dani-vaibhav Nov 7, 2025
c43eaa6
Dummy commit 2
dani-vaibhav Nov 7, 2025
c41d588
Add unit tests for ItemListingRepository and ItemListingUnitOfWork
dani-vaibhav Nov 12, 2025
160864d
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Nov 12, 2025
9bd8d4c
Add TypeScript binary scripts for Twilio service
dani-vaibhav Nov 12, 2025
4a13019
fix: address critical code review issues
Copilot Nov 12, 2025
c2b8856
refactor: align all layers to use Requested and Accepted terminology
Copilot Nov 12, 2025
726b409
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Nov 13, 2025
7e6dc74
refactor: clean up imports and improve code readability in MyListings…
dani-vaibhav Nov 13, 2025
52fd55e
feat: implement auto-rejection of overlapping reservation requests up…
dani-vaibhav Nov 13, 2025
c6efd84
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Nov 13, 2025
6331956
feat: add automatic conversation creation on reservation acceptance
dani-vaibhav Nov 13, 2025
f94f382
feat: add queryOverlapByListingIdAndReservationPeriod method to reser…
dani-vaibhav Nov 14, 2025
b3d8769
Add '@sthrift/domain' package to pnpm-lock.yaml
dani-vaibhav Nov 18, 2025
7688345
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Nov 19, 2025
72243ca
Update dummy image URLs in ListingRequestDomainShape and improve imag…
dani-vaibhav Nov 19, 2025
0b1c737
Enhance ListingRequestDomainShape with thumbnailUrl and images proper…
dani-vaibhav Nov 19, 2025
6bc709f
refactor: address PR review comments - remove out-of-scope features
dani-vaibhav Nov 27, 2025
f8cb220
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Nov 27, 2025
dfc2c69
refactor: improve data loading and error handling in MyListingsDashbo…
dani-vaibhav Nov 27, 2025
7a6f87f
chore: update pnpm-lock.yaml after removing event-handler dependencies
dani-vaibhav Nov 27, 2025
3eab4f7
fix: resolve security vulnerabilities with pnpm audit --fix
dani-vaibhav Nov 27, 2025
2c555ad
fix: add pnpm overrides to resolve security vulnerabilities
dani-vaibhav Nov 27, 2025
9eb1054
chore: add node-forge override to pnpm-workspace.yaml
dani-vaibhav Nov 28, 2025
8a5ab89
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 1, 2025
5a89483
fix: update axios version to resolve compatibility issues
dani-vaibhav Dec 1, 2025
3ed4dd8
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 1, 2025
d9371f1
fix: update sharer ObjectId and enhance population logic in reservati…
dani-vaibhav Dec 1, 2025
a84e139
fix: address code review feedback - remove debug logs and node_modules
Copilot Dec 1, 2025
d075a2d
fix: replace cpx with rsync for Node.js v22 compatibility
arif-u-ahmed Dec 1, 2025
37cb3eb
feat: implement reservation request update functionality with state m…
dani-vaibhav Dec 1, 2025
8f6f98f
feat: add update functionality to reservation request service and res…
dani-vaibhav Dec 1, 2025
339e545
refactor: remove accept reservation request functionality
dani-vaibhav Dec 1, 2025
9658bda
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 3, 2025
bb62191
fix: remove state mappings and fix typo in ui-components package.json
Copilot Dec 3, 2025
f5d863f
refactor: move business logic from update service to domain layer
Copilot Dec 3, 2025
e792c16
Updated package.json as per the current main branch
dani-vaibhav Dec 3, 2025
b81d582
fix: align listing getter pattern with codebase convention
Copilot Dec 3, 2025
fdd05d1
fix: update object property access in resolver helper and remove unus…
dani-vaibhav Dec 3, 2025
5dd21ba
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 4, 2025
adffa51
fix : Success Toast Message after accepting the request
dani-vaibhav Dec 4, 2025
fc3f483
fix: update pnpm-lock.yaml to remove deprecated node-forge version an…
dani-vaibhav Dec 4, 2025
516c64c
fix : Build issue
dani-vaibhav Dec 4, 2025
7fc22a5
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 4, 2025
18c374d
fix : build issue
dani-vaibhav Dec 4, 2025
5f55249
chore: update express and @apollo/server versions in pnpm-lock.yaml
dani-vaibhav Dec 4, 2025
671e4f8
fix : Build error issues
dani-vaibhav Dec 4, 2025
7696bb1
fix: Build error issues
dani-vaibhav Dec 5, 2025
e044ff1
fix : Build issue
dani-vaibhav Dec 5, 2025
c280c5c
Reset package.jsons to main version and update pnpm lock
jasonmorais Dec 5, 2025
ebfb97e
updated lock file
jasonmorais Dec 5, 2025
01ddd91
fix vulernabilities
jasonmorais Dec 5, 2025
f8563b5
fixed dependency in types and actual apckage
jasonmorais Dec 5, 2025
019b9d2
refactor: Update user and listing fields to use object structure in a…
dani-vaibhav Dec 8, 2025
d50efb3
feat: Add scenarios for fallback behavior in PopulateUserFromField an…
dani-vaibhav Dec 8, 2025
fcaafc4
Merged main
dani-vaibhav Dec 9, 2025
3273b4e
fix: Update pnpm lock.yaml
dani-vaibhav Dec 9, 2025
2f6f62b
refactor: Improve population logic in ReservationRequest domain adapt…
dani-vaibhav Dec 9, 2025
a41284d
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 9, 2025
6dd5645
fix: Update status handling in getStatusTagClass and getActionButtons…
dani-vaibhav Dec 9, 2025
186fda9
fix: Update request acceptance logic and add tests for status helpers
dani-vaibhav Dec 9, 2025
23d05bf
feat: Implement comprehensive update feature and tests for reservatio…
dani-vaibhav Dec 9, 2025
6e1f839
fix: implement action handler stubs and remove unused sharerEmail field
Copilot Dec 10, 2025
6a7666d
fix: remove sharerEmail from reservation request acceptance logic
dani-vaibhav Dec 10, 2025
050baf5
feat: Add scenarios for accepting reservation requests in resolvers
dani-vaibhav Dec 10, 2025
bdce90b
fix: address @jasonmorais code review feedback
Copilot Dec 11, 2025
bed90c3
fix: update request handling functions to prepare for future mutations
dani-vaibhav Dec 12, 2025
b587379
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 12, 2025
07ab9be
feat: add message button for closed requests in action buttons
dani-vaibhav Dec 15, 2025
a87af97
refactor: remove export keyword from interface declarations in listin…
dani-vaibhav Dec 15, 2025
7dbe837
feat: enhance request handling and button rendering for various reque…
dani-vaibhav Dec 15, 2025
4cc12ac
feat: add mocks for reservation request and user in tests
dani-vaibhav Dec 15, 2025
2a007a0
feat: enable query depth limit validation in Apollo Server
dani-vaibhav Dec 16, 2025
d8f5760
refactor: remove graphql-depth-limit dependency and related code to f…
dani-vaibhav Dec 16, 2025
5a6705a
feat: add graphql-depth-limit dependency and re-enable depth limit va…
dani-vaibhav Dec 16, 2025
4f8ac47
refactor: Resolving sorcery ai comments through : streamline action b…
dani-vaibhav Dec 16, 2025
34bcafd
refactor: enhance type safety in aggregation results and mapping for …
dani-vaibhav Dec 16, 2025
f9692df
refactor: improve type safety and clarity in aggregation result mappi…
dani-vaibhav Dec 16, 2025
5566bec
refactor: update mock server initialization to dynamically bind to an…
dani-vaibhav Dec 16, 2025
e247aad
refactor: enhance auto-reject logic for overlapping requests and impr…
dani-vaibhav Dec 16, 2025
9f11967
refactor: update reservation request handling to use listing referenc…
dani-vaibhav Dec 17, 2025
23ef69c
refactor: improve sharerId handling and simplify loading state manage…
dani-vaibhav Dec 17, 2025
826b507
refactor: remove unnecessary helper abstractions and simplify contain…
dani-vaibhav Dec 17, 2025
e4e523d
refactor: inline action handlers in requests components
dani-vaibhav Dec 17, 2025
5c94fd3
refactor: remove redundant error handling from requests container
dani-vaibhav Dec 18, 2025
52ce35f
refactor: simplify auto-reject logic by checking request state directly
dani-vaibhav Dec 18, 2025
c0b68ac
refactor: simplify myListingsRequests query by removing pagination an…
dani-vaibhav Dec 18, 2025
e842b41
refactor: simplify repository mapping logic per PR feedback
dani-vaibhav Dec 18, 2025
a78b786
refactor: update UI to match simplified GraphQL schema
dani-vaibhav Dec 18, 2025
5354d77
fix : Data population
dani-vaibhav Dec 19, 2025
97fe325
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 19, 2025
e762bfc
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 19, 2025
68170d9
fix: remove unused useNavigate import
dani-vaibhav Dec 19, 2025
9a702a8
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Dec 24, 2025
5391e9a
PR comments fix
dani-vaibhav Dec 30, 2025
35f019f
refactor: modularize action buttons and cell rendering in AllListings…
dani-vaibhav Dec 30, 2025
efb5d3d
fix: update reservation request states and properties for clarity
dani-vaibhav Dec 30, 2025
361292f
fix: add pnpm overrides for qs package to resolve version conflicts
dani-vaibhav Jan 2, 2026
0be20b3
refactor: reorganize imports and improve code formatting for readability
dani-vaibhav Jan 5, 2026
003b0d7
fix: update environment variable access to use bracket notation for c…
dani-vaibhav Jan 5, 2026
b19d2e1
refactor: streamline action rendering logic in RequestsTable component
dani-vaibhav Jan 5, 2026
238bf27
feat: implement AllListingsTable component with enhanced filtering an…
dani-vaibhav Jan 5, 2026
cc81763
fix: change STATUS_OPTIONS export to const for consistency
dani-vaibhav Jan 5, 2026
59bbf18
fix: update environment variable access for admin and user profiles f…
dani-vaibhav Jan 5, 2026
4d77a7e
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Jan 6, 2026
1f4a66f
fix: correct pnpm configuration by consolidating overrides and auditC…
dani-vaibhav Jan 6, 2026
558a52e
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Jan 7, 2026
175e460
feat: add listing title and status filter components
dani-vaibhav Jan 7, 2026
7996028
feat: refactor listings table components and remove unused files
dani-vaibhav Jan 7, 2026
2fe1243
refactor: clean up requests table components for improved readability
dani-vaibhav Jan 7, 2026
5683e61
refactor: clean up requests table components for improved readability
dani-vaibhav Jan 7, 2026
e792066
fix: correct pnpm configuration by consolidating overrides and auditC…
dani-vaibhav Jan 7, 2026
7435bfd
Merge branch 'main' into copilot/sub-pr-257
dani-vaibhav Jan 8, 2026
6c51ae6
ProfilePage updated
dani-vaibhav Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ __*
apps/ui-sharethrift/tsconfig.tsbuildinfo
**/node_modules
**/dist

# Log files
*.log
5 changes: 3 additions & 2 deletions apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const isDevelopment = NODE_ENV === 'development';

Cellix.initializeInfrastructureServices<ApiContextSpec, ApplicationServices>(
(serviceRegistry) => {

serviceRegistry
.registerInfrastructureService(
new ServiceMongoose(
Expand All @@ -47,7 +46,9 @@ Cellix.initializeInfrastructureServices<ApiContextSpec, ApplicationServices>(
new ServiceTokenValidation(TokenValidationConfig.portalTokens),
)
.registerInfrastructureService(
isDevelopment ? new ServiceMessagingMock() : new ServiceMessagingTwilio(),
isDevelopment
? new ServiceMessagingMock()
: new ServiceMessagingTwilio(),
)
.registerInfrastructureService(
isDevelopment ? new PaymentServiceMock() : new PaymentServiceCybersource()
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@cellix/typescript-config/node.json",
"extends": "@cellix/typescript-config/node.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "dist"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ import {
import { expect, within } from 'storybook/test';

const mockUserSarah: PersonalUser = {
__typename: 'PersonalUser',
id: '507f1f77bcf86cd799439099',
userIsAdmin: false,
userType: 'personal-user',
account: {
__typename: 'PersonalUserAccount',
accountType: 'verified-personal',

username: 'sarah_williams',
email: 'sarah.williams@example.com',
profile: {
__typename: 'PersonalUserAccountProfile',
firstName: 'Sarah',
lastName: 'Williams',
location: {
Expand All @@ -36,10 +40,14 @@ const mockUserSarah: PersonalUser = {
};

const mockUserAlex: PersonalUser = {
__typename: 'PersonalUser',
id: '507f1f77bcf86cd799439102',
userIsAdmin: false,
userType: 'personal-user',
account: {
__typename: 'PersonalUserAccount',
profile: {
__typename: 'PersonalUserAccountProfile',
firstName: 'Alex',
lastName: '',
location: {
Expand All @@ -57,6 +65,7 @@ const mockUserAlex: PersonalUser = {

const mockTwoListings: ItemListing[] = [
{
__typename: 'ItemListing',
id: '64f7a9c2d1e5b97f3c9d0a41',
title: 'City Bike',
description:
Expand All @@ -72,6 +81,7 @@ const mockTwoListings: ItemListing[] = [
listingType: 'item-listing',
},
{
__typename: 'ItemListing',
id: '64f7a9c2d1e5b97f3c9d0a13',
title: 'Projector',
description: 'HD projector for movie nights and presentations.',
Expand All @@ -87,19 +97,6 @@ const mockTwoListings: ItemListing[] = [
},
];

const userIsAdminMockRequest = (userId: string) => {
return {
request: {
query: UseUserIsAdminDocument,
},
result: {
data: {
currentUser: {id: userId, userIsAdmin: false },
},
},
};
};

const meta: Meta<typeof HomeRoutes> = {
title: 'Pages/Account/Profile',
component: HomeRoutes,
Expand All @@ -121,6 +118,20 @@ export const DefaultView: Story = {
parameters: {
apolloClient: {
mocks: [
{
request: {
query: UseUserIsAdminDocument,
},
result: {
data: {
currentUser: {
id: mockUserSarah.id,
userIsAdmin: false,
__typename: 'PersonalUser',
},
},
},
},
{
request: {
query: HomeAccountProfileViewContainerCurrentUserDocument,
Expand All @@ -140,15 +151,15 @@ export const DefaultView: Story = {
result: {
data: {
myListingsAll: {
__typename: 'PaginatedMyListings',
items: mockTwoListings,
total: 2,
total: mockTwoListings.length,
page: 1,
pageSize: 100,
},
},
},
},
userIsAdminMockRequest(mockUserSarah.id),
],
},
},
Expand All @@ -158,6 +169,20 @@ export const NoListings: Story = {
parameters: {
apolloClient: {
mocks: [
{
request: {
query: UseUserIsAdminDocument,
},
result: {
data: {
currentUser: {
id: mockUserAlex.id,
userIsAdmin: false,
__typename: 'PersonalUser',
},
},
},
},
{
request: {
query: HomeAccountProfileViewContainerCurrentUserDocument,
Expand All @@ -175,11 +200,16 @@ export const NoListings: Story = {
},
result: {
data: {
myListingsAll: { items: [], total: 0, page: 1, pageSize: 100 },
myListingsAll: {
__typename: 'PaginatedMyListings',
items: [],
total: 0,
page: 1,
pageSize: 100,
},
},
},
},
userIsAdminMockRequest(mockUserAlex.id),
],
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { useApolloClient, useMutation, useQuery } from '@apollo/client/react';
import { useState } from 'react';
import { message } from 'antd';
import { ListingInformation } from './listing-information.tsx';

import { useState } from 'react';
import {
HomeListingInformationCreateReservationRequestDocument,
type CreateReservationRequestInput,
HomeListingInformationCreateReservationRequestDocument,
type ItemListing,
ViewListingActiveReservationRequestForListingDocument,
type ViewListingActiveReservationRequestForListingQuery,
ViewListingCurrentUserDocument,
type ViewListingCurrentUserQuery,
ViewListingQueryActiveByListingIdDocument,
type ViewListingQueryActiveByListingIdQuery,
type ViewListingQueryActiveByListingIdQueryVariables,
ViewListingActiveReservationRequestForListingDocument,
type ItemListing,
type ViewListingActiveReservationRequestForListingQuery,
} from '../../../../../../generated.tsx';
import { ListingInformation } from './listing-information.tsx';

interface ListingInformationContainerProps {
listing: ItemListing;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Row, Col, DatePicker, Button } from 'antd';
import dayjs from 'dayjs';
import { LoadingOutlined } from '@ant-design/icons';
import { Button, Col, DatePicker, Row } from 'antd';
import type { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import type {
ViewListingQueryActiveByListingIdQuery,
ItemListing,
ViewListingActiveReservationRequestForListingQuery,
ViewListingQueryActiveByListingIdQuery,
} from '../../../../../../generated.tsx';
import { LoadingOutlined } from '@ant-design/icons';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';

// Manual isBetween logic for Dayjs
function isBetweenManual(
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same idea here as the above comment

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

import { Input } from 'antd';
const { Search } = Input;

interface ListingTitleFilterDropdownProps {
readonly onSearch: (value: string) => void;
readonly searchText: string;
readonly setSelectedKeys: (selectedKeys: React.Key[]) => void;
readonly selectedKeys: React.Key[];
readonly confirm: () => void;
}

export function ListingTitleFilterDropdown({
onSearch,
searchText,
setSelectedKeys,
selectedKeys,
confirm,
}: ListingTitleFilterDropdownProps): React.ReactNode {
return (
<div style={{ padding: 8 }}>
<Search
placeholder="Search listings"
value={selectedKeys.length ? (selectedKeys[0] as string) : searchText}
onChange={(e) => {
setSelectedKeys(e.target.value ? [e.target.value] : []);
}}
onSearch={(value) => {
confirm();
onSearch(value);
}}
style={{ width: 200 }}
allowClear
/>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Tag } from 'antd';

import { getStatusTagClass } from './status-tag-class.ts';

export function AllListingsTableStatus({
status,
}: Readonly<{
status: string;
}>): React.ReactNode {
return <Tag className={getStatusTagClass(status)}>{status}</Tag>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const AllListingsCard: React.FC<AllListingsCardProps> = ({
onClick={() => onViewPendingRequests(listing.id)}
>
<span style={{ display: 'flex', alignItems: 'center' }}>
View Pending Requests
View Requests
<Badge
count={0}
showZero
Expand Down
Loading
Loading