Skip to content

fix: scroll-#371#377

Open
ayushchaudhari562 wants to merge 1 commit into
apsinghdev:mainfrom
ayushchaudhari562:fix-scroll-#371
Open

fix: scroll-#371#377
ayushchaudhari562 wants to merge 1 commit into
apsinghdev:mainfrom
ayushchaudhari562:fix-scroll-#371

Conversation

@ayushchaudhari562
Copy link
Copy Markdown

@ayushchaudhari562 ayushchaudhari562 commented May 22, 2026

Summary by CodeRabbit

  • Style

    • Updated pricing page layout with refined visual effects and styling
    • Enhanced shine border animations with improved responsiveness to viewport visibility
  • Refactor

    • Optimized canvas animation performance for smoother rendering and reduced resource consumption

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@ayushchaudhari562 is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

This PR updates the API database provider from PostgreSQL to SQLite with supporting build script and type annotation changes, while simultaneously optimizing web UI animations and pricing page styling through targeted canvas rendering and visibility-aware shine border effects.

Changes

API Database Provider and Build Configuration

Layer / File(s) Summary
Prisma postinstall script migration to Node
apps/api/package.json
Updated scripts.postinstall from POSIX shell conditional with || true fallback to a Node.js-based fs.existsSync/execSync conditional that runs prisma generate with inherited stdio when the schema file exists.
Database provider configuration migration
apps/api/prisma/schema.prisma
Changed datasource db provider from PostgreSQL to SQLite while retaining the same DATABASE_URL environment variable configuration.
Prisma Client middleware type annotations
apps/api/src/prisma.ts
Added explicit TypeScript : any type annotations to { args, query } parameters across Prisma $extends middleware for account delegates (create, update, upsert, findUnique, findFirst, findMany) and user delegates (findUnique, findFirst, findMany); encryption/decryption and result mapping logic unchanged.

Web UI Animation and Styling Optimizations

Layer / File(s) Summary
Pricing page layout and glow styling updates
apps/web/src/app/(main)/(landing)/pricing/page.tsx
Added isolate and inline contain: layout paint to the pricing section wrapper, removed backdrop-blur-xl, and replaced blurred white glow background elements with centered radial-gradient overlays (absolutely positioned, pointer-events-none) in both primary and secondary pricing card sections.
FlickeringGrid canvas optimization for targeted updates
apps/web/src/components/ui/flickering-grid.tsx
updateSquares now returns indices of changed squares instead of only mutating opacity; new drawUpdatedSquares callback clears and repaints only those cells using computed grid coordinates; resize/init path calls drawGrid once with current dimensions; animation loop calls updateSquares and renders only changed cells via drawUpdatedSquares, replacing full-grid redraws each frame.
ShineBorder visibility-aware animation with inline keyframes
apps/web/src/components/ui/shine-borders.tsx
ShineBorder now uses ref with IntersectionObserver to track visibility and pause/resume animation; generates gradientColor from single or array shineColor; replaces single-div radial-gradient with outer masked container and inner element running new inline shine-transform keyframes animation with conditional animationPlayState based on visibility, removing prior CSS class-based animation behaviors.

Possibly Related PRs

  • apsinghdev/opensox#309: The main PR's visual/animation changes to pricing/page.tsx plus updated FlickeringGrid and ShineBorder implementations are likely in conflict with or intended to pair with the retrieved PR's pricing-page perf rework (including ShineBorder/FlickeringGrid restructuring).
  • apsinghdev/opensox#190: Both PRs modify apps/web/src/app/(main)/(landing)/pricing/page.tsx presentation/layout—main PR changes the pricing section's glow/overlay styling while the retrieved PR updates the pricing card price/badge markup—so the changes are directly related.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit hops through SQLite fields,
Where canvas paints just what it yields,
Glows fade to gradients bright and lean,
Intersection watchers keep it keen,
Performance blooms in every scene!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: scroll-#371' is vague and does not clearly describe the actual changes made in the pull request. Replace with a descriptive title that explains the primary change, such as 'refactor: optimize canvas rendering and add intersection observer to animations' or similar to match the actual file modifications.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/api/src/prisma.ts`:
- Line 26: Replace all uses of the unsafe any in the Prisma extension callbacks
and map callbacks with proper types: import Prisma types from '`@prisma/client`'
and type the extension callback parameters (replace "{ args, query }: any" in
create/update/upsert/findUnique/findFirst/findMany) using
Prisma.MiddlewareParams (or the specific delegate arg types provided by your
Prisma version) and the Prisma client/query return types instead of any; replace
map callback parameters "account: any" / "user: any" with the generated model
types (import type { Account, User } from '`@prisma/client`') so map callbacks use
Account/User; and change encryptAccountTokens/decryptAccountTokens signatures
from (data: any) => any to explicit input/output types (e.g., (data:
AccountTokens) => EncryptedAccountTokens or a concrete Record shape) and
propagate those types to callers so no downstream any remains. Ensure you import
the required types and update all occurrences of these symbols
(create/update/upsert/findUnique/findFirst/findMany, account, user,
encryptAccountTokens, decryptAccountTokens) accordingly.

In `@apps/web/src/app/`(main)/(landing)/pricing/page.tsx:
- Around line 490-493: The inline radial-gradient with hardcoded rgba values in
the glow overlay div should be extracted into a reusable component or utility
(e.g., GlowOverlay) and the gradient must be implemented using Tailwind
design-token colors instead of literal hex/rgba; replace the style prop on the
element with a class (or component) that references a custom Tailwind
class/variant defined in your tailwind config or global css that composes a
radial-gradient using design tokens (token names from your color palette), then
replace both occurrences (the current div with className "absolute h-[250px]
w-[150%] left-1/2 -translate-x-1/2 -bottom-24 opacity-60 pointer-events-none"
and the duplicate overlay later) to use that reusable class/component.
- Around line 373-374: The div in page.tsx currently uses an inline style
"style={{ contain: 'layout paint' }}" which must be replaced with a
design-system/Tailwind-compatible utility; remove the inline style from the
element with class "relative border-b border-[`#252525`] lg:pb-10 isolate" and
instead add a named utility (e.g., .contain-layout-paint or a Tailwind
plugin/arbitrary utility) in the shared design-system CSS/Tailwind config that
emits "contain: layout paint", ensure the class is available to the app
(imported or safelisted), and then apply that utility class (e.g.,
"contain-layout-paint") to the same div so all styling uses Tailwind/design
tokens rather than inline styles.

In `@apps/web/src/components/ui/shine-borders.tsx`:
- Around line 55-62: The component currently injects the `@keyframes`
"shine-transform" and uses inline animation styles inside the JSX fragment (see
the style tag in shine-borders.tsx and the similar block around lines 84-88);
move that keyframes/animation definition into a shared stylesheet or add it to
the Tailwind config as a custom animation (e.g., extend
theme.animation/keyframes), remove the <style> tag and any inline style
animation properties in the component, and instead toggle the animation with
Tailwind utility classes or a custom class (referencing the "shine-transform"
name when you add it to Tailwind) so the component uses classes only for
styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7f8e3b70-f0a9-454f-8d0a-8bb922d1f2cf

📥 Commits

Reviewing files that changed from the base of the PR and between 697f361 and bfdf88c.

⛔ Files ignored due to path filters (1)
  • apps/api/prisma/dev.db is excluded by !**/*.db
📒 Files selected for processing (6)
  • apps/api/package.json
  • apps/api/prisma/schema.prisma
  • apps/api/src/prisma.ts
  • apps/web/src/app/(main)/(landing)/pricing/page.tsx
  • apps/web/src/components/ui/flickering-grid.tsx
  • apps/web/src/components/ui/shine-borders.tsx

Comment thread apps/api/src/prisma.ts
query: {
account: {
async create({ args, query }) {
async create({ args, query }: any) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the file
ls -la apps/api/src/prisma.ts

# Show the relevant sections around the referenced lines
nl -ba apps/api/src/prisma.ts | sed -n '1,140p'

# Find any ": any" occurrences in prisma.ts
rg -n ": any" apps/api/src/prisma.ts || true

# Show additional occurrences across apps/api/src if needed
rg -n ": any" apps/api/src/prisma.ts apps/api/src -S --glob='**/*.ts' | head -n 200

Repository: apsinghdev/opensox

Length of output: 195


🏁 Script executed:

#!/bin/bash
set -euo pipefail

ls -la apps/api/src/prisma.ts

# Print first 140 lines with line numbers (avoid nl)
awk '{printf "%4d:%s\n", NR, $0}' apps/api/src/prisma.ts | sed -n '1,140p'

# Find any ": any" occurrences in prisma.ts
rg -n ": any" apps/api/src/prisma.ts || true

Repository: apsinghdev/opensox

Length of output: 4984


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# show encryption util
ls -la apps/api/src/utils/encryption.js apps/api/src/utils/encryption.ts 2>/dev/null || true
sed -n '1,200p' apps/api/src/utils/encryption.js 2>/dev/null || true

# also search for encrypt/decrypt function definitions/usages
rg -n "function (encryptAccountTokens|decryptAccountTokens)|const (encryptAccountTokens|decryptAccountTokens)" apps/api/src/utils -S || true
rg -n "encryptAccountTokens|decryptAccountTokens" apps/api/src -S --glob='**/*.ts' --glob='**/*.js' | head -n 200

Repository: apsinghdev/opensox

Length of output: 1764


remove any in prisma extension callback types

apps/api/src/prisma.ts introduces : any on the prisma extension middleware signatures (create/update/upsert/findUnique/findFirst/findMany) and also uses account: any / user: any in .map(...) callbacks (lines 26, 31, 36, 42, 46, 50, 57, 68, 79). this bypasses type safety on critical db query paths.

apps/api/src/utils/encryption.ts also types encryptAccountTokens/decryptAccountTokens as (data: any) => any (lines 100, 144), which prevents fully eliminating any downstream.

proposed fix
-      async create({ args, query }: any) {
+      async create({ args, query }) {
...
-      async update({ args, query }: any) {
+      async update({ args, query }) {
...
-      async upsert({ args, query }: any) {
+      async upsert({ args, query }) {
...
-      async findUnique({ args, query }: any) {
+      async findUnique({ args, query }) {
...
-      async findFirst({ args, query }: any) {
+      async findFirst({ args, query }) {
...
-      async findMany({ args, query }: any) {
+      async findMany({ args, query }) {
...
-      async findUnique({ args, query }: any) {
+      async findUnique({ args, query }) {
...
-      async findFirst({ args, query }: any) {
+      async findFirst({ args, query }) {
...
-      async findMany({ args, query }: any) {
+      async findMany({ args, query }) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/src/prisma.ts` at line 26, Replace all uses of the unsafe any in the
Prisma extension callbacks and map callbacks with proper types: import Prisma
types from '`@prisma/client`' and type the extension callback parameters (replace
"{ args, query }: any" in create/update/upsert/findUnique/findFirst/findMany)
using Prisma.MiddlewareParams (or the specific delegate arg types provided by
your Prisma version) and the Prisma client/query return types instead of any;
replace map callback parameters "account: any" / "user: any" with the generated
model types (import type { Account, User } from '`@prisma/client`') so map
callbacks use Account/User; and change encryptAccountTokens/decryptAccountTokens
signatures from (data: any) => any to explicit input/output types (e.g., (data:
AccountTokens) => EncryptedAccountTokens or a concrete Record shape) and
propagate those types to callers so no downstream any remains. Ensure you import
the required types and update all occurrences of these symbols
(create/update/upsert/findUnique/findFirst/findMany, account, user,
encryptAccountTokens, decryptAccountTokens) accordingly.

Comment on lines +373 to +374
<div className="relative border-b border-[#252525] lg:pb-10 isolate" style={{ contain: 'layout paint' }}>
<div className="flex flex-col gap-5 lg:gap-10 py-4 bg-[#151515]/20 h-full relative w-full overflow-hidden px-4 lg:px-10">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

replace inline contain style with design-system-compatible utility usage

this adds inline style on a web component, which conflicts with the styling rule for this path. please move this to tailwind/design-token-based styling.

as per coding guidelines "always use tailwind classes for styling html elements; avoid using css or style tags".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(main)/(landing)/pricing/page.tsx around lines 373 - 374,
The div in page.tsx currently uses an inline style "style={{ contain: 'layout
paint' }}" which must be replaced with a design-system/Tailwind-compatible
utility; remove the inline style from the element with class "relative border-b
border-[`#252525`] lg:pb-10 isolate" and instead add a named utility (e.g.,
.contain-layout-paint or a Tailwind plugin/arbitrary utility) in the shared
design-system CSS/Tailwind config that emits "contain: layout paint", ensure the
class is available to the app (imported or safelisted), and then apply that
utility class (e.g., "contain-layout-paint") to the same div so all styling uses
Tailwind/design tokens rather than inline styles.

Comment on lines +490 to +493
<div
className="absolute h-[250px] w-[150%] left-1/2 -translate-x-1/2 -bottom-24 opacity-60 pointer-events-none"
style={{ background: 'radial-gradient(ellipse at center, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%)' }}
></div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

avoid duplicated inline radial gradients with hardcoded color values

both glow overlays use duplicated inline gradient strings and hardcoded color values. extract a reusable class/component and use semantic design-token colors via tailwind utilities.

as per coding guidelines "never use hardcoded hex values directly in components; always reference colors from the design token system using tailwind classes".

Also applies to: 647-650

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(main)/(landing)/pricing/page.tsx around lines 490 - 493,
The inline radial-gradient with hardcoded rgba values in the glow overlay div
should be extracted into a reusable component or utility (e.g., GlowOverlay) and
the gradient must be implemented using Tailwind design-token colors instead of
literal hex/rgba; replace the style prop on the element with a class (or
component) that references a custom Tailwind class/variant defined in your
tailwind config or global css that composes a radial-gradient using design
tokens (token names from your color palette), then replace both occurrences (the
current div with className "absolute h-[250px] w-[150%] left-1/2
-translate-x-1/2 -bottom-24 opacity-60 pointer-events-none" and the duplicate
overlay later) to use that reusable class/component.

Comment on lines +55 to +62
<>
<style>{`
@keyframes shine-transform {
0% { transform: translate(-33.33%, -33.33%); }
50% { transform: translate(33.33%, 33.33%); }
100% { transform: translate(-33.33%, -33.33%); }
}
`}</style>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

move keyframes/animation styling out of component-local style tag

injecting @keyframes inside each component instance and driving animation via inline style is not aligned with the web styling rules here. define the animation in tailwind/config or shared stylesheet and toggle with classes.

as per coding guidelines "always use tailwind classes for styling html elements; avoid using css or style tags".

Also applies to: 84-88

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/components/ui/shine-borders.tsx` around lines 55 - 62, The
component currently injects the `@keyframes` "shine-transform" and uses inline
animation styles inside the JSX fragment (see the style tag in shine-borders.tsx
and the similar block around lines 84-88); move that keyframes/animation
definition into a shared stylesheet or add it to the Tailwind config as a custom
animation (e.g., extend theme.animation/keyframes), remove the <style> tag and
any inline style animation properties in the component, and instead toggle the
animation with Tailwind utility classes or a custom class (referencing the
"shine-transform" name when you add it to Tailwind) so the component uses
classes only for styling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant