From 929e98450246c56b3b8d0886f67bbb224868b472 Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 12:29:11 +0530 Subject: [PATCH 1/7] chore(AR-19): restructure GitHub workflows for automated tests and manual release deployment - Restrict main.yml triggers to development pushes and pull requests - Restructure release.yaml to trigger manually, perform builds/tests, and deploy via FTP - Update conventional release Git author name to 'AR portfolio bot' - Delete redundant deploy.yaml file --- .github/workflows/deploy.yaml | 28 ------------------------- .github/workflows/main.yml | 2 +- .github/workflows/release.yaml | 37 ++++++++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index a78dd4e..0000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Deploy job - -on: - release: - types: [published] - -jobs: - setup_and_deploy: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - - name: Install Dependencies - run: yarn install - - name: Build - run: yarn build --if-present - - name: 📂 Sync files - uses: SamKirkland/FTP-Deploy-Action@v4.3.5 - with: - server: ${{ secrets.AMITRAIKWAR_FTP_SERVER }} - username: ${{ secrets.AMITRAIKWAR_FTP_ACCOUNT }} - password: ${{ secrets.AMITRAIKWAR_FTP_PASSWORD }} - local-dir: ./build/ - server-dir: ./ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4194682..d52b365 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: push: branches: ['development'] pull_request: - branches: ['development', 'production'] + branches: ['development'] jobs: build_test_lint: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f68ab4e..35596c3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,28 +7,57 @@ permissions: contents: write jobs: - release: + release_and_deploy: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x] steps: - name: checkout uses: actions/checkout@v4 with: token: ${{ secrets.PA_TOKEN }} + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Dependencies + run: yarn install + + - name: Build + run: yarn build --if-present + + - name: Linting + run: yarn lint + + - name: Test + run: yarn test:cov + + - name: 📂 Sync files (Deploy) + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 + with: + server: ${{ secrets.AMITRAIKWAR_FTP_SERVER }} + username: ${{ secrets.AMITRAIKWAR_FTP_ACCOUNT }} + password: ${{ secrets.AMITRAIKWAR_FTP_PASSWORD }} + local-dir: ./build/ + server-dir: ./ + - name: conventional changelog action id: changelog # https://github.com/TriPSs/conventional-changelog-action uses: TriPSs/conventional-changelog-action@latest with: - # you can also create separate token to trace action github-token: '${{ secrets.PA_TOKEN }}' - git-user-name: 'AR mac Bot' + git-user-name: 'AR portfolio bot' output-file: false + - name: create release # https://github.com/actions/create-release uses: softprops/action-gh-release@v1 if: ${{steps.changelog.outputs.skipped == 'false'}} env: - # This token is provided by Actions, you do not need to create your own token GITHUB_TOKEN: ${{ secrets.PA_TOKEN }} with: tag_name: ${{ steps.changelog.outputs.tag }} From e87e0358a8218a45a07b3b8e07d120574e69cb31 Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 12:34:16 +0530 Subject: [PATCH 2/7] fix(AR-19): fix Orb dependency warning and CI build failure - Move vert and frag shader variables outside the Orb component - Resolve react-hooks/exhaustive-deps lint warning - Fix CI=true build failure in GitHub Actions environment --- src/components/Orb/Orb.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/Orb/Orb.tsx b/src/components/Orb/Orb.tsx index eadba1f..0f6aa96 100644 --- a/src/components/Orb/Orb.tsx +++ b/src/components/Orb/Orb.tsx @@ -9,16 +9,7 @@ interface OrbProps { backgroundColor?: string; } -export default function Orb({ - hue = 0, - hoverIntensity = 0.2, - rotateOnHover = true, - forceHoverState = false, - backgroundColor = '#000000', -}: OrbProps) { - const ctnDom = useRef(null); - - const vert = /* glsl */ ` +const vert = /* glsl */ ` precision highp float; attribute vec2 position; attribute vec2 uv; @@ -29,7 +20,7 @@ export default function Orb({ } `; - const frag = /* glsl */ ` +const frag = /* glsl */ ` precision highp float; uniform float iTime; @@ -191,6 +182,15 @@ export default function Orb({ } `; +export default function Orb({ + hue = 0, + hoverIntensity = 0.2, + rotateOnHover = true, + forceHoverState = false, + backgroundColor = '#000000', +}: OrbProps) { + const ctnDom = useRef(null); + useEffect(() => { const container = ctnDom.current; if (!container) return; From 5c7de4b9862ab3ede65e4a56dec99e335e97a0ca Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 12:35:41 +0530 Subject: [PATCH 3/7] chore(AR-19): split monolithic build_test_lint job into sequential steps - Split build_test_lint into lint, test, and build sequential jobs - Chain jobs using the needs keyword to stop execution early on failures - Add Yarn dependency caching to speed up workflows --- .github/workflows/main.yml | 40 +++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d52b365..9499024 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,24 +7,50 @@ on: branches: ['development'] jobs: - build_test_lint: + lint: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x] steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 18.x uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'yarn' - name: Install Dependencies run: yarn install - - name: Build - run: yarn build --if-present - name: Linting run: yarn lint + + test: + needs: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'yarn' + - name: Install Dependencies + run: yarn install - name: Test run: yarn test:cov - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} + + build: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 18.x + uses: actions/setup-node@v3 + with: + node-version: 18.x + cache: 'yarn' + - name: Install Dependencies + run: yarn install + - name: Build + run: yarn build --if-present From aa842899f716af97bd1db1c0038048c5794d63c7 Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 12:37:17 +0530 Subject: [PATCH 4/7] chore(AR-19): update Node.js version to 22.x in workflows - Update setup-node version to 22.x in main.yml and release.yaml - Verify build and test compatibility locally using Node 22 --- .github/workflows/main.yml | 12 ++++++------ .github/workflows/release.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9499024..dbd6023 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js 22.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 22.x cache: 'yarn' - name: Install Dependencies run: yarn install @@ -26,10 +26,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js 22.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 22.x cache: 'yarn' - name: Install Dependencies run: yarn install @@ -45,10 +45,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js 22.x uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 22.x cache: 'yarn' - name: Install Dependencies run: yarn install diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 35596c3..54cdc5b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18.x] + node-version: [22.x] steps: - name: checkout uses: actions/checkout@v4 From 3314307473eaad35e60728986b3240f3ab33afd6 Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 12:47:10 +0530 Subject: [PATCH 5/7] fix(AR-19): fix AnimatePresence JSX component type error and optimize main workflow - Cast AnimatePresence to any as SafeAnimatePresence to bypass TS2786 type mismatch - Optimize main.yml to run yarn install once and share node_modules via caching - Apply SafeAnimatePresence to ModalBody, Cover, SocialNavigation, Work, and Contact components --- .github/workflows/main.yml | 40 +++- src/components/CoverText/Cover.tsx | 6 +- src/components/animateModal/AnimatedModal.tsx | 6 +- src/screens/common/SocialNavigation.tsx | 6 +- src/screens/mainFlow/contents/Contact.tsx | 6 +- src/screens/mainFlow/contents/Work.tsx | 174 +++++++++--------- 6 files changed, 137 insertions(+), 101 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbd6023..524be08 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: branches: ['development'] jobs: - lint: + install: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -16,8 +16,30 @@ jobs: with: node-version: 22.x cache: 'yarn' + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - name: Install Dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' run: yarn install + + lint: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 22.x + uses: actions/setup-node@v3 + with: + node-version: 22.x + - name: Restore node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - name: Linting run: yarn lint @@ -30,9 +52,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: 22.x - cache: 'yarn' - - name: Install Dependencies - run: yarn install + - name: Restore node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - name: Test run: yarn test:cov - name: Upload coverage reports to Codecov @@ -49,8 +73,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: 22.x - cache: 'yarn' - - name: Install Dependencies - run: yarn install + - name: Restore node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - name: Build run: yarn build --if-present diff --git a/src/components/CoverText/Cover.tsx b/src/components/CoverText/Cover.tsx index c386b32..9048070 100644 --- a/src/components/CoverText/Cover.tsx +++ b/src/components/CoverText/Cover.tsx @@ -27,6 +27,8 @@ export const Cover = ({ children }: { children?: React.ReactNode }) => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [ref.current]); +const SafeAnimatePresence = AnimatePresence as any; + return (
setHovered(true)} @@ -34,7 +36,7 @@ export const Cover = ({ children }: { children?: React.ReactNode }) => { ref={ref} className="relative hover:bg-neutral-900 group/cover inline-block dark:bg-neutral-900 bg-neutral-100 px-2 py-2 transition duration-200 rounded-sm" > - + {hovered && ( { )} - + {beamPositions.map((position, index) => ( setOpen(false)); +const SafeAnimatePresence = AnimatePresence as any; + return ( - + {open && ( )} - + ); }; diff --git a/src/screens/common/SocialNavigation.tsx b/src/screens/common/SocialNavigation.tsx index 08f62a1..cd78cc4 100644 --- a/src/screens/common/SocialNavigation.tsx +++ b/src/screens/common/SocialNavigation.tsx @@ -80,6 +80,8 @@ const SocialNavigation = () => { setCursorInsets(undefined); }; +const SafeAnimatePresence = AnimatePresence as any; + return ( <> {/* Desktop Version */} @@ -197,7 +199,7 @@ const SocialNavigation = () => { }} transition="all 0.2s" /> - + {isOpen && ( { )} - + ); diff --git a/src/screens/mainFlow/contents/Contact.tsx b/src/screens/mainFlow/contents/Contact.tsx index f1ef5d5..c452fbe 100644 --- a/src/screens/mainFlow/contents/Contact.tsx +++ b/src/screens/mainFlow/contents/Contact.tsx @@ -12,6 +12,8 @@ const Contact = () => { const ref = useRef(null); const isContactContainerIntersecting = useIsIntersecting(ref); +const SafeAnimatePresence = AnimatePresence as any; + return ( { > {CONTACT.email} - + {isContactContainerIntersecting && ( { {t('contact.getInTouch')} )} - + ); diff --git a/src/screens/mainFlow/contents/Work.tsx b/src/screens/mainFlow/contents/Work.tsx index b170073..d69ccf1 100644 --- a/src/screens/mainFlow/contents/Work.tsx +++ b/src/screens/mainFlow/contents/Work.tsx @@ -31,100 +31,102 @@ const WorkUIData = () => { content: (() => { // eslint-disable-next-line react-hooks/rules-of-hooks const [isOpen, setIsOpen] = useState(false); - return ( - setIsOpen(true)} - onMouseLeave={() => setIsOpen(false)} - onClick={() => setIsOpen(!isOpen)} - cursor="pointer" - > - - {title} - - {description} - - {isOpen && ( - setIsOpen(true)} + onMouseLeave={() => setIsOpen(false)} + onClick={() => setIsOpen(!isOpen)} + cursor="pointer" + > + - {keyPoints && keyPoints.length > 0 && ( - - )} - {keyPoints.map((point, index) => ( - + {description} + + {isOpen && ( + - {point} - - ))} - {tags && tags.length > 0 && ( - - )} - - {tags.map((tag, index) => ( - - {tag} - - ))} - - - - - {links.map(({ title, link }, index) => ( + {keyPoints && keyPoints.length > 0 && ( + + )} + {keyPoints.map((point, index) => ( - {title} + {point} ))} - - - - )} - + {tags && tags.length > 0 && ( + + )} + + {tags.map((tag, index) => ( + + {tag} + + ))} + + + + + {links.map(({ title, link }, index) => ( + + {title} + + ))} + + + + )} + ); })(), From 3be2fe25173e6d7c26fcb43cc0b767987dc854fc Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 12:53:30 +0530 Subject: [PATCH 6/7] fix(AR-19): fix swapped type parameters in useCallQuery and useCallSBMutation - Correct type arguments passed to useCallSBQueryArgs and useCallSBMutationArgs - Fix TS2554 compilation error during production builds --- src/services/hooks/common/useCallQuery.ts | 2 +- src/services/hooks/common/useCallSBMutation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/hooks/common/useCallQuery.ts b/src/services/hooks/common/useCallQuery.ts index 3891c0d..b1bc4df 100644 --- a/src/services/hooks/common/useCallQuery.ts +++ b/src/services/hooks/common/useCallQuery.ts @@ -10,7 +10,7 @@ import { useCallSBQueryArgs } from './types'; const useCallQuery = ({ method, queryOptions, -}: useCallSBQueryArgs) => +}: useCallSBQueryArgs) => useQuery({ ...queryOptions, queryFn: (request) => method(request), diff --git a/src/services/hooks/common/useCallSBMutation.ts b/src/services/hooks/common/useCallSBMutation.ts index 40e4b08..e0075f2 100644 --- a/src/services/hooks/common/useCallSBMutation.ts +++ b/src/services/hooks/common/useCallSBMutation.ts @@ -4,7 +4,7 @@ import { useCallSBMutationArgs } from './types'; const useCallSBMutation = ({ method, mutationOptions, -}: useCallSBMutationArgs) => +}: useCallSBMutationArgs) => useMutation({ ...mutationOptions, mutationFn: (request) => method(request), From e609482139606829e14e486a544a9da1d9845479 Mon Sep 17 00:00:00 2001 From: Amit Raikwar Date: Sun, 14 Jun 2026 13:03:01 +0530 Subject: [PATCH 7/7] fix(AR-19): decouple mutation and query hook method types from react-query internals - Replace MutationFunction and QueryFunction imports with plain TypeScript function signatures - Relax extends object constraints to support primitive types - Fix TS2554 compilation errors on method invocations --- src/services/hooks/common/types.ts | 14 ++++++-------- src/services/hooks/common/useCallQuery.ts | 2 +- src/services/hooks/common/useCallSBMutation.ts | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/services/hooks/common/types.ts b/src/services/hooks/common/types.ts index 0b81db3..1bd3514 100644 --- a/src/services/hooks/common/types.ts +++ b/src/services/hooks/common/types.ts @@ -1,15 +1,13 @@ import { - MutationFunction, - QueryFunction, UseMutationOptions, UseQueryOptions, } from '@tanstack/react-query'; export type useCallSBMutationArgs< - TRequest extends object, - TResponse extends object, + TRequest, + TResponse, > = { - method: MutationFunction; + method: (request: TRequest) => Promise; mutationOptions?: Omit< UseMutationOptions, 'mutationFn' @@ -17,9 +15,9 @@ export type useCallSBMutationArgs< }; export type useCallSBQueryArgs< - TRequest extends object, - TResponse extends object, + TRequest, + TResponse, > = { - method: QueryFunction; + method: (request: any) => Promise | TResponse; queryOptions: Omit, 'queryFn'>; }; diff --git a/src/services/hooks/common/useCallQuery.ts b/src/services/hooks/common/useCallQuery.ts index b1bc4df..653d9e2 100644 --- a/src/services/hooks/common/useCallQuery.ts +++ b/src/services/hooks/common/useCallQuery.ts @@ -7,7 +7,7 @@ import { useCallSBQueryArgs } from './types'; * @param mutationOptions - The options for the mutation. * @returns useQuery result. */ -const useCallQuery = ({ +const useCallQuery = ({ method, queryOptions, }: useCallSBQueryArgs) => diff --git a/src/services/hooks/common/useCallSBMutation.ts b/src/services/hooks/common/useCallSBMutation.ts index e0075f2..572a4a5 100644 --- a/src/services/hooks/common/useCallSBMutation.ts +++ b/src/services/hooks/common/useCallSBMutation.ts @@ -1,7 +1,7 @@ import { useMutation } from '@tanstack/react-query'; import { useCallSBMutationArgs } from './types'; -const useCallSBMutation = ({ +const useCallSBMutation = ({ method, mutationOptions, }: useCallSBMutationArgs) =>