Skip to content

feat: scaffold hotel apartment detail route placeholder#85

Open
Obiajulu-gif wants to merge 2 commits intosafetrustcr:mainfrom
Obiajulu-gif:feat/hotel-detail-route-placeholder
Open

feat: scaffold hotel apartment detail route placeholder#85
Obiajulu-gif wants to merge 2 commits intosafetrustcr:mainfrom
Obiajulu-gif:feat/hotel-detail-route-placeholder

Conversation

@Obiajulu-gif
Copy link
Copy Markdown

@Obiajulu-gif Obiajulu-gif commented Mar 28, 2026

This pull request sets up the initial structure for the SafeTrust web application using Next.js, TypeScript, and pnpm workspaces. It includes configuration files for the monorepo, the web app, and build scripts, as well as basic placeholder pages and styles for the apartment booking flow.

Monorepo and Build System Setup:

  • Added a root package.json with a build script and set up pnpm workspaces via pnpm-workspace.yaml. [1] [2]
  • Introduced a scripts/build.mjs script to build the web app using pnpm, supporting both Windows and Unix platforms.
  • Added turbo.json for managing build tasks and caching with Turborepo.

Web Application Configuration:

  • Created apps/web/package.json with Next.js, React, and TypeScript dependencies and scripts.
  • Added apps/web/tsconfig.json with strict TypeScript settings and Next.js plugin.
  • Configured Next.js in apps/web/next.config.mjs to ignore TypeScript and ESLint errors during builds.

Core Application Files and Styles:

  • Implemented a global CSS file with base styles and a desktop suggestion class in apps/web/src/app/globals.css.
  • Created the root layout in apps/web/src/app/layout.tsx with metadata and global styles import.
  • Added a simple home page linking to a placeholder apartment detail page in apps/web/src/app/page.tsx.
  • Developed a stub apartment detail page in apps/web/src/app/hotel/[id]/page.tsx with hardcoded data and TODOs for future components. (apps/web/src/app/hotel/[id]/page.tsxR1-R189)

Closes #70

Summary by CodeRabbit

  • New Features
    • Launched new web app with a Home page and global styling for consistent look and responsive behavior
    • Added apartment detail page showing property info, image gallery placeholders, price, amenities, owner details, and a BOOK action
    • Desktop-specific suggestion sidebar for enhanced browsing
    • In-app navigation linking Home to sample listing pages (e.g., /hotel/1)

Copilot AI review requested due to automatic review settings March 28, 2026 09:10
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@Obiajulu-gif Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5a9fdc13-ef8d-49d6-ad6c-635780ed3671

📥 Commits

Reviewing files that changed from the base of the PR and between 94088c1 and 9a8f3a6.

📒 Files selected for processing (1)
  • apps/web/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/package.json

📝 Walkthrough

Walkthrough

Scaffolds a Next.js 14 web app in a pnpm monorepo: workspace and root build tooling, Next.js app configuration, TypeScript setup, global styles, root/home pages, and a dynamic apartment detail page stub with a BOOK link.

Changes

Cohort / File(s) Summary
Monorepo foundation
./.gitignore, ./pnpm-workspace.yaml, ./package.json, ./turbo.json, ./scripts/build.mjs
Adds workspace metadata and pnpm workspace globs, Turbo build task, a cross-platform build script that runs pnpm --filter @safetrust/web build, and common ignores (node_modules/, .turbo/, .next/).
Web app manifest & config
apps/web/package.json, apps/web/next.config.mjs, apps/web/next-env.d.ts, apps/web/tsconfig.json
Creates @safetrust/web package with scripts and dependencies, Next.js config (disables eslint/typescript build errors), Next.js type refs, and a strict TypeScript config tailored for Next.js.
App layout & pages
apps/web/src/app/layout.tsx, apps/web/src/app/page.tsx, apps/web/src/app/hotel/[id]/page.tsx
Adds root layout with metadata, a Home page linking to /hotel/1, and a dynamic apartment detail page rendering stub data, image placeholders, suggestions sidebar, and a BOOK button linking to /hotel/{id}/escrow/create.
Styling
apps/web/src/app/globals.css
Adds global CSS reset, base typography/colors, universal box-sizing, link styling, and a desktop rule to show .desktop-suggestions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 In a tiny repo patch I hop,
Planting pages where routes will crop,
From root to /hotel the pathways run,
A BOOK button shines like morning sun —
Hoppity code, the scaffold's done! 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: scaffolding a hotel apartment detail route placeholder with stub data and UI components.
Linked Issues check ✅ Passed The PR fully implements all coding requirements from issue #70: dynamic route /hotel/[id]/page.tsx exists, stub apartment data renders, BOOK button links to escrow creation, image gallery placeholders present, suggestions sidebar visible on desktop, and all TODO comments reference correct source components.
Out of Scope Changes check ✅ Passed All changes directly support the apartment detail route scaffolding. Monorepo configuration files, build setup, root layout, and home page are necessary supporting infrastructure for the feature, not out-of-scope.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/hotel-detail-route-placeholder

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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Scaffolds the initial apps/web Next.js (App Router) application inside a pnpm-workspaces monorepo and adds a placeholder /hotel/[id] apartment detail route for the escrow booking flow.

Changes:

  • Added pnpm workspace + root build entrypoint script for building @safetrust/web.
  • Introduced Turborepo configuration (turbo.json) and lockfile.
  • Implemented basic Next.js app shell (layout, globals, homepage) and /hotel/[id] stub detail page with BOOK link.

Reviewed changes

Copilot reviewed 11 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
turbo.json Defines Turbo build task configuration and cache outputs.
scripts/build.mjs Cross-platform root build wrapper that runs pnpm --filter @safetrust/web build.
pnpm-workspace.yaml Declares apps/* as workspace packages.
pnpm-lock.yaml Locks monorepo dependencies (Turbo + Next/React/TS).
package.json Root package manifest with pnpm packageManager pin and build script.
apps/web/package.json Web app manifest with Next/React dependencies and scripts.
apps/web/tsconfig.json Strict TypeScript config for the Next.js app.
apps/web/next.config.mjs Next.js config (currently set to ignore TS/ESLint errors on build).
apps/web/next-env.d.ts Next.js TypeScript environment references.
apps/web/src/app/globals.css Global styles + responsive helper for desktop suggestions.
apps/web/src/app/layout.tsx Root layout wiring global CSS and metadata.
apps/web/src/app/page.tsx Home page linking to the hotel detail placeholder route.
apps/web/src/app/hotel/[id]/page.tsx Stub apartment detail page with placeholders and BOOK link to escrow create.
.gitignore Ignores node_modules, Turbo cache, and Next build outputs.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"private": true,
"packageManager": "pnpm@10.11.0",
"scripts": {
"build": "node scripts/build.mjs"
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

The root pnpm-lock.yaml includes turbo as a devDependency for the . importer and the repo adds turbo.json, but this root package.json doesn't declare turbo. This makes the lockfile/manifests inconsistent; either add turbo to root devDependencies or drop the Turbo setup and regenerate the lockfile.

Suggested change
"build": "node scripts/build.mjs"
"build": "node scripts/build.mjs"
},
"devDependencies": {
"turbo": "^2.0.0"

Copilot uses AI. Check for mistakes.
throw result.error;
}

process.exit(result.status ?? 0);
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

spawnSync can return status: null when the child exits via a signal (e.g., killed by CI timeout). Using result.status ?? 0 will report success in that case; handle result.signal/status === null explicitly and propagate a non-zero exit code so failures aren't masked.

Suggested change
process.exit(result.status ?? 0);
const exitCode =
typeof result.status === 'number'
? result.status
: result.signal
? 1
: 1;
process.exit(exitCode);

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +7
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

ignoreDuringBuilds and ignoreBuildErrors make next build succeed even when ESLint/TypeScript would normally fail. That undermines the strict TS config and can let broken code ship; consider removing these overrides, or guarding them behind an env flag so CI/prod builds still enforce checks.

Suggested change
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
const shouldIgnoreBuildErrors = process.env.NEXT_IGNORE_BUILD_ERRORS === 'true';
const nextConfig = {
eslint: {
ignoreDuringBuilds: shouldIgnoreBuildErrors,
},
typescript: {
ignoreBuildErrors: shouldIgnoreBuildErrors,

Copilot uses AI. Check for mistakes.
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: 5

🧹 Nitpick comments (3)
.gitignore (1)

3-4: Redundant entry and missing common ignores.

Line 4 (apps/web/.next/) is redundant since .next/ on line 3 already matches any .next/ directory in the tree. Consider also adding common entries for a more complete setup.

♻️ Suggested .gitignore improvements
 node_modules/
 .turbo/
 .next/
-apps/web/.next/
+.env*
+.DS_Store
+*.log
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 3 - 4, Remove the redundant `apps/web/.next/` entry
since the top-level `.next/` already ignores all `.next` directories; delete
that line and consolidate ignores, and augment the file with common entries such
as node_modules, .env, dist/build/output directories, .turbo, .parcel-cache,
.DS_Store, coverage, .idea, .vscode, and any editor/OS/tool-specific caches so
the repo ignores standard generated and sensitive files.
apps/web/src/app/globals.css (2)

19-23: Note on !important usage.

The !important flag here suggests the base .desktop-suggestions style uses display: none inline or via another rule. This pattern works but couples the CSS tightly. Document the expected base state or consider using a CSS class toggle approach for clarity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/globals.css` around lines 19 - 23, The stylesheet currently
forces .desktop-suggestions to display:block with !important, which hides the
fact that the base state is expected to be hidden elsewhere; remove the
!important and instead document the base state and/or implement a clear toggle
class (e.g., .desktop-suggestions and .desktop-suggestions--visible) or increase
selector specificity to override the base rule; update the CSS around the
.desktop-suggestions rule to either include a comment describing the expected
base display (hidden) or replace the pattern with a visibility-toggle class and
adjust any JS that shows/hides suggestions to use that class.

14-17: Consider link accessibility.

Removing underlines from links can reduce accessibility, as users (especially those with color vision deficiencies) may not easily distinguish links from regular text. Consider adding an alternative visual indicator like underline on hover/focus, or ensuring links have sufficient color contrast.

♻️ Suggested accessibility improvement
 a {
   color: inherit;
   text-decoration: none;
 }
+
+a:hover,
+a:focus {
+  text-decoration: underline;
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/globals.css` around lines 14 - 17, The global rule removing
link underlines (selector "a" in globals.css) reduces accessibility; update the
CSS so links keep a visible indicator — for example, restore text-decoration for
:hover and :focus/:focus-visible states (or add an outline or border-bottom on
those states) and ensure the link color meets contrast requirements against the
background; modify the "a" selector and add "a:hover, a:focus, a:focus-visible"
rules (or equivalent classes) to provide a clear visual cue on interaction while
keeping the base color inheritance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/next.config.mjs`:
- Around line 3-8: Remove the production-suppressing flags in next.config.mjs:
do not set eslint.ignoreDuringBuilds or typescript.ignoreBuildErrors to true
(remove them or set them to false) and instead enforce checks by adding a CI
step and/or npm scripts that run next lint and tsc --noEmit (and add
pre-commit/pre-push hooks if desired); update the project configuration so that
functions referencing eslint.ignoreDuringBuilds and typescript.ignoreBuildErrors
no longer bypass build failures and ensure the repository has a CI workflow that
fails the build on lint/type errors.

In `@apps/web/src/app/hotel/`[id]/page.tsx:
- Line 161: The Link href currently interpolates params.id directly which can
produce malformed URLs for IDs with reserved characters; update the link
construction in the component that renders the Link (the element using Link
href={`/hotel/${params.id}/escrow/create`}) to URL-encode the dynamic segment by
using encodeURIComponent on params.id so the escrow URL is safe (e.g., build the
href from `/hotel/${encodeURIComponent(params.id)}/escrow/create`).
- Around line 23-24: Replace the personal-looking contact values in the stub
fixture by removing or anonymizing the fields: locate the stub object in
page.tsx that defines the email and phone properties (the keys "email" and
"phone") and either delete those keys if unused or replace their values with
clearly synthetic placeholders (e.g., support@example.com, +000 000 0000) to
avoid committing PII; ensure any tests or UI that depend on these fields are
updated to accept the placeholders or handle missing contact fields.

In `@package.json`:
- Around line 1-8: The root package.json is missing turbo as a devDependency
even though a turbo.json exists; update package.json to add a devDependencies
object (or extend it) including "turbo" with a pinned version (e.g., "turbo":
"1.10.0" or the repo's chosen version) alongside the existing packageManager
"pnpm@10.11.0" entry so the monorepo tooling is declared at the root.

In `@scripts/build.mjs`:
- Line 16: The current exit uses process.exit(result.status ?? 0) which masks
failures when result.status is null (process killed by signal); change the logic
to exit with the actual numeric status when present, otherwise use a non‑zero
code (e.g., 1) or derive from result.signal if you want more detail: check
result.status and result.signal and call process.exit(status) where status is
result.status if !== null, otherwise 1 (or a mapped code based on result.signal)
so build failures aren't treated as success.

---

Nitpick comments:
In @.gitignore:
- Around line 3-4: Remove the redundant `apps/web/.next/` entry since the
top-level `.next/` already ignores all `.next` directories; delete that line and
consolidate ignores, and augment the file with common entries such as
node_modules, .env, dist/build/output directories, .turbo, .parcel-cache,
.DS_Store, coverage, .idea, .vscode, and any editor/OS/tool-specific caches so
the repo ignores standard generated and sensitive files.

In `@apps/web/src/app/globals.css`:
- Around line 19-23: The stylesheet currently forces .desktop-suggestions to
display:block with !important, which hides the fact that the base state is
expected to be hidden elsewhere; remove the !important and instead document the
base state and/or implement a clear toggle class (e.g., .desktop-suggestions and
.desktop-suggestions--visible) or increase selector specificity to override the
base rule; update the CSS around the .desktop-suggestions rule to either include
a comment describing the expected base display (hidden) or replace the pattern
with a visibility-toggle class and adjust any JS that shows/hides suggestions to
use that class.
- Around line 14-17: The global rule removing link underlines (selector "a" in
globals.css) reduces accessibility; update the CSS so links keep a visible
indicator — for example, restore text-decoration for :hover and
:focus/:focus-visible states (or add an outline or border-bottom on those
states) and ensure the link color meets contrast requirements against the
background; modify the "a" selector and add "a:hover, a:focus, a:focus-visible"
rules (or equivalent classes) to provide a clear visual cue on interaction while
keeping the base color inheritance.
🪄 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: e9c57340-57a5-42ae-9283-7c3695df7b4a

📥 Commits

Reviewing files that changed from the base of the PR and between decc85f and 94088c1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • pnpm-workspace.yaml
  • .gitignore
  • apps/web/next-env.d.ts
  • apps/web/next.config.mjs
  • apps/web/package.json
  • apps/web/src/app/globals.css
  • apps/web/src/app/hotel/[id]/page.tsx
  • apps/web/src/app/layout.tsx
  • apps/web/src/app/page.tsx
  • apps/web/tsconfig.json
  • package.json
  • pnpm-workspace.yaml
  • scripts/build.mjs
  • turbo.json

Comment on lines +3 to +8
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Current Next build-check bypass flags:"
rg -n "ignoreDuringBuilds|ignoreBuildErrors" apps/web/next.config.mjs

echo
echo "Check whether the repo has separate lint/typecheck scripts as compensating controls:"
fd -i package.json | while read -r f; do
  echo "== $f =="
  rg -n "\"(lint|typecheck|check)\"\\s*:" "$f" || true
done

Repository: safetrustcr/dApp-SafeTrust

Length of output: 304


🏁 Script executed:

cat -n apps/web/package.json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 605


🏁 Script executed:

cat -n package.json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 269


🏁 Script executed:

fd -i "\.github|\.gitlab-ci|\.travis|Makefile|\.circleci" -t d

Repository: safetrustcr/dApp-SafeTrust

Length of output: 52


🏁 Script executed:

fd -i "workflow|\.yml|\.yaml" -t f | grep -i "ci\|lint\|check\|test" | head -20

Repository: safetrustcr/dApp-SafeTrust

Length of output: 52


🏁 Script executed:

cat -n scripts/build.mjs

Repository: safetrustcr/dApp-SafeTrust

Length of output: 578


🏁 Script executed:

fd -type f | grep -E "(github|gitlab|travis|circle|workflow|\.yml|\.yaml|\.toml|\.config)" | head -30

Repository: safetrustcr/dApp-SafeTrust

Length of output: 240


🏁 Script executed:

fd -type f -name ".*" | grep -v node_modules | head -30

Repository: safetrustcr/dApp-SafeTrust

Length of output: 240


🏁 Script executed:

find . -maxdepth 2 -name ".*" -type f | grep -v "\.git" | head -20

Repository: safetrustcr/dApp-SafeTrust

Length of output: 104


🏁 Script executed:

fd -e yml -e yaml -e json | grep -i "eslint\|tsconfig\|github\|gitlab" | head -20

Repository: safetrustcr/dApp-SafeTrust

Length of output: 92


🏁 Script executed:

ls -la | head -30

Repository: safetrustcr/dApp-SafeTrust

Length of output: 992


🏁 Script executed:

cat -n biome.json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 1713


🏁 Script executed:

cat -n turbo.json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 283


🏁 Script executed:

find . -path "./.git" -prune -o -type f \( -name "*.github" -o -name "*.yml" -o -name "*.yaml" \) -print | head -20

Repository: safetrustcr/dApp-SafeTrust

Length of output: 129


🏁 Script executed:

find . -path "./.git" -prune -o -name ".husky" -type d -print

Repository: safetrustcr/dApp-SafeTrust

Length of output: 52


🏁 Script executed:

find . -path "./.git" -prune -o -name "pre-commit*" -type f -print

Repository: safetrustcr/dApp-SafeTrust

Length of output: 52


🏁 Script executed:

rg "lint|check|test" package.json scripts/ apps/web/package.json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 52


Do not suppress lint/type failures for production builds.

The ignoreDuringBuilds and ignoreBuildErrors settings on lines 4 and 7 allow next build to succeed with TypeScript/ESLint errors with no compensating controls. There are no lint scripts, pre-commit hooks, or CI/CD workflows to enforce these checks, meaning broken code can ship to production.

🔧 Suggested fix
 /** `@type` {import('next').NextConfig} */
+const enforceChecks = process.env.CI === 'true' || process.env.NODE_ENV === 'production';
+
 const nextConfig = {
   eslint: {
-    ignoreDuringBuilds: true,
+    ignoreDuringBuilds: !enforceChecks,
   },
   typescript: {
-    ignoreBuildErrors: true,
+    ignoreBuildErrors: !enforceChecks,
   },
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/next.config.mjs` around lines 3 - 8, Remove the
production-suppressing flags in next.config.mjs: do not set
eslint.ignoreDuringBuilds or typescript.ignoreBuildErrors to true (remove them
or set them to false) and instead enforce checks by adding a CI step and/or npm
scripts that run next lint and tsc --noEmit (and add pre-commit/pre-push hooks
if desired); update the project configuration so that functions referencing
eslint.ignoreDuringBuilds and typescript.ignoreBuildErrors no longer bypass
build failures and ensure the repository has a CI workflow that fails the build
on lint/type errors.

Comment on lines +23 to +24
email: 'albertoCasas100@gmail.com',
phone: '+506 64852179',
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

Avoid committing personal-looking contact data in stub fixtures.

Line 23 and Line 24 contain email/phone values that look like real PII. Use clearly synthetic placeholders or remove unused contact fields from the stub.

🔧 Suggested fix
   owner: {
     name: 'Alberto Casas',
-    email: 'albertoCasas100@gmail.com',
-    phone: '+506 64852179',
+    email: 'owner@example.com',
+    phone: '+1-555-0100',
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
email: 'albertoCasas100@gmail.com',
phone: '+506 64852179',
owner: {
name: 'Alberto Casas',
email: 'owner@example.com',
phone: '+1-555-0100',
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/hotel/`[id]/page.tsx around lines 23 - 24, Replace the
personal-looking contact values in the stub fixture by removing or anonymizing
the fields: locate the stub object in page.tsx that defines the email and phone
properties (the keys "email" and "phone") and either delete those keys if unused
or replace their values with clearly synthetic placeholders (e.g.,
support@example.com, +000 000 0000) to avoid committing PII; ensure any tests or
UI that depend on these fields are updated to accept the placeholders or handle
missing contact fields.

</p>
</div>

<Link href={`/hotel/${params.id}/escrow/create`} style={styles.button}>
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 | 🟡 Minor

Encode dynamic path segments before building the escrow URL.

Line 161 should encode params.id to prevent malformed links when IDs contain reserved characters.

🔧 Suggested fix
-          <Link href={`/hotel/${params.id}/escrow/create`} style={styles.button}>
+          <Link href={`/hotel/${encodeURIComponent(params.id)}/escrow/create`} style={styles.button}>
             BOOK
           </Link>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/hotel/`[id]/page.tsx at line 161, The Link href currently
interpolates params.id directly which can produce malformed URLs for IDs with
reserved characters; update the link construction in the component that renders
the Link (the element using Link href={`/hotel/${params.id}/escrow/create`}) to
URL-encode the dynamic segment by using encodeURIComponent on params.id so the
escrow URL is safe (e.g., build the href from
`/hotel/${encodeURIComponent(params.id)}/escrow/create`).

Comment on lines +1 to +8
{
"name": "dapp-safetrust",
"private": true,
"packageManager": "pnpm@10.11.0",
"scripts": {
"build": "node scripts/build.mjs"
}
}
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 | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if pnpm 10.11.0 exists on npm registry
curl -s "https://registry.npmjs.org/pnpm/10.11.0" | jq '.version // "Version not found"'

Repository: safetrustcr/dApp-SafeTrust

Length of output: 79


🏁 Script executed:

cat -n package.json | head -30

Repository: safetrustcr/dApp-SafeTrust

Length of output: 269


🏁 Script executed:

rg "turbo" --type json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 128


🏁 Script executed:

head -20 scripts/build.mjs

Repository: safetrustcr/dApp-SafeTrust

Length of output: 466


🏁 Script executed:

rg "turbo" package.json

Repository: safetrustcr/dApp-SafeTrust

Length of output: 52


🏁 Script executed:

fd "turbo" --type f

Repository: safetrustcr/dApp-SafeTrust

Length of output: 80


Add turbo to root devDependencies.

The project has a turbo.json configuration file, which means turbo is part of the monorepo setup. It should be listed as a devDependency in the root package.json alongside the pinned pnpm@10.11.0 version.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 1 - 8, The root package.json is missing turbo as a
devDependency even though a turbo.json exists; update package.json to add a
devDependencies object (or extend it) including "turbo" with a pinned version
(e.g., "turbo": "1.10.0" or the repo's chosen version) alongside the existing
packageManager "pnpm@10.11.0" entry so the monorepo tooling is declared at the
root.

throw result.error;
}

process.exit(result.status ?? 0);
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n "process\\.exit\\(result\\.status \\?\\? 0\\)" scripts/build.mjs
rg -n "result\\.status|result\\.signal" scripts/build.mjs

Repository: safetrustcr/dApp-SafeTrust

Length of output: 143


🏁 Script executed:

cat -n scripts/build.mjs

Repository: safetrustcr/dApp-SafeTrust

Length of output: 578


Do not default failed child-process termination to exit code 0.

When the child process is terminated by signal, result.status is null, and the current code exits with code 0, masking the build failure.

🔧 Suggested fix
-process.exit(result.status ?? 0);
+if (typeof result.status === 'number') {
+  process.exit(result.status);
+}
+
+if (result.signal) {
+  process.kill(process.pid, result.signal);
+}
+
+process.exit(1);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/build.mjs` at line 16, The current exit uses
process.exit(result.status ?? 0) which masks failures when result.status is null
(process killed by signal); change the logic to exit with the actual numeric
status when present, otherwise use a non‑zero code (e.g., 1) or derive from
result.signal if you want more detail: check result.status and result.signal and
call process.exit(status) where status is result.status if !== null, otherwise 1
(or a mapped code based on result.signal) so build failures aren't treated as
success.

@sotoJ24 sotoJ24 self-requested a review March 30, 2026 00:37
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@sotoJ24 sotoJ24 left a comment

Choose a reason for hiding this comment

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

Dear @Obiajulu-gif, could you please make the changes request by coderabbit?

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.

📌feat: scaffold apps/web/src/app/hotel/[id]/ apartment detail route placeholder

3 participants