Skip to content

Post Details Screen - #153

Merged
danctila merged 7 commits into
mainfrom
frontend/post-details
Dec 5, 2025
Merged

danctila merged 7 commits into
mainfrom
frontend/post-details

Conversation

@eric-kitagawa

@eric-kitagawa eric-kitagawa commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

Description

[Link to Ticket](insert the link to your ticket inside the parenthesis here)

added a post details screen

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. If they are unit
tests, provide the file name the tests are in. If they are not unit tests,
describe how you tested the change.

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-12-05.at.00.16.56.mov

Checklist

  • I have performed a self-review of my code
  • I have reached out to another developer to review my code
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes

@eric-kitagawa

Copy link
Copy Markdown
Contributor Author
cd /app

npx prisma db execute --schema=prisma/schema.prisma --stdin <<'SQL'

-- First, insert a test movie if it doesn't exist
INSERT INTO "public"."movie" ("movieId", "title", "description", "imdbRating", "localRating", "numRatings")
VALUES (
  'test-movie-001',
  'Test Movie for Comments',
  'A test movie for testing comment threads',
  85,
  '0',
  '0'
)
ON CONFLICT ("movieId") DO NOTHING;

-- Now insert the post with the movie we just created
INSERT INTO "public"."Post" ("id", "userId", "movieId", "content", "type", "spoiler", "tags", "createdAt", "imageUrls")
VALUES (
  'test-post-comments-001',
  '5c8430d2-6957-4527-a0b4-8ff1f2c46b00',
  'test-movie-001',
  'Test post for deep comment threads - What did you think of this movie?',
  'SHORT',
  false,
  ARRAY[]::text[],
  NOW(),
  ARRAY[]::text[]
)
ON CONFLICT ("id") DO UPDATE
SET "content" = EXCLUDED."content";

-- Top-level comments (depth 0)
INSERT INTO "public"."Comment" ("id", "userId", "postId", "content", "createdAt", "parentId")
VALUES
  ('c-root-001', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Loved this movie, especially the pacing and the third act.', NOW() - INTERVAL '2 hours', NULL),
  ('c-root-002', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Sound design was incredible. The theater was shaking.', NOW() - INTERVAL '1 hour 50 minutes', NULL),
  ('c-root-003', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Characters felt a bit flat to me, but visuals were top-tier.', NOW() - INTERVAL '1 hour 40 minutes', NULL),
  ('c-root-004', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Plot twist halfway through totally caught me off guard.', NOW() - INTERVAL '1 hour 30 minutes', NULL),
  ('c-root-005', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Solid movie, but the ending felt rushed.', NOW() - INTERVAL '1 hour 20 minutes', NULL)
ON CONFLICT ("id") DO NOTHING;

-- First-level replies (depth 1)
INSERT INTO "public"."Comment" ("id", "userId", "postId", "content", "createdAt", "parentId")
VALUES
  ('c-r1-001', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Agree, the pacing made the 2 hours fly by.', NOW() - INTERVAL '1 hour 45 minutes', 'c-root-001'),
  ('c-r1-002', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Third act felt like a different movie in a good way.', NOW() - INTERVAL '1 hour 40 minutes', 'c-root-001'),
  ('c-r2-001', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'That one scene with the bass drop was insane.', NOW() - INTERVAL '1 hour 35 minutes', 'c-root-002'),
  ('c-r2-002', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Headphones do not do this justice, you need a theater.', NOW() - INTERVAL '1 hour 30 minutes', 'c-root-002'),
  ('c-r3-001', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'I actually liked the minimal character backstory.', NOW() - INTERVAL '1 hour 25 minutes', 'c-root-003'),
  ('c-r4-001', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Same, I had to rewind to see the setup clues.', NOW() - INTERVAL '1 hour 20 minutes', 'c-root-004'),
  ('c-r4-002', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'The twist makes a second watch so much better.', NOW() - INTERVAL '1 hour 15 minutes', 'c-root-004'),
  ('c-r5-001', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Yeah, last 10 minutes felt like they were on fast-forward.', NOW() - INTERVAL '1 hour 10 minutes', 'c-root-005')
ON CONFLICT ("id") DO NOTHING;

-- Second-level replies (depth 2) – triggers "Continue Thread"
INSERT INTO "public"."Comment" ("id", "userId", "postId", "content", "createdAt", "parentId")
VALUES
  ('c-r1-001-a', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Exactly, not a single boring scene for me.', NOW() - INTERVAL '1 hour 5 minutes', 'c-r1-001'),
  ('c-r1-001-b', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'I wish more blockbusters took pacing this seriously.', NOW() - INTERVAL '1 hour', 'c-r1-001'),
  ('c-r1-002-a', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Felt like a directors cut with all the payoffs.', NOW() - INTERVAL '55 minutes', 'c-r1-002'),
  ('c-r2-001-a', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'My seat was literally vibrating during that scene.', NOW() - INTERVAL '50 minutes', 'c-r2-001'),
  ('c-r2-001-b', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Surround mix was so clean, no muddy dialogue.', NOW() - INTERVAL '45 minutes', 'c-r2-001'),
  ('c-r4-001-a', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Once you know the twist, every early line hits different.', NOW() - INTERVAL '40 minutes', 'c-r4-001'),
  ('c-r5-001-a', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'I wonder if they cut another 15 minutes for runtime.', NOW() - INTERVAL '35 minutes', 'c-r5-001')
ON CONFLICT ("id") DO NOTHING;

-- Third-level replies (depth 3)
INSERT INTO "public"."Comment" ("id", "userId", "postId", "content", "createdAt", "parentId")
VALUES
  ('c-r1-001-a-1', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'Right? Every scene had purpose.', NOW() - INTERVAL '30 minutes', 'c-r1-001-a'),
  ('c-r2-001-a-1', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'IMAX or Dolby Cinema is the way to go for this one.', NOW() - INTERVAL '25 minutes', 'c-r2-001-a'),
  ('c-r4-001-a-1', '5c8430d2-6957-4527-a0b4-8ff1f2c46b00', 'test-post-comments-001',
   'The foreshadowing was so subtle the first time!', NOW() - INTERVAL '20 minutes', 'c-r4-001-a')
ON CONFLICT ("id") DO NOTHING;

SQL

run this in the shell to fill the backend with a bunch of data necessary to test the post details page. (you need to match the hardcoded postid for it to route correctly

@eric-kitagawa eric-kitagawa changed the title [WIP] Frontend/post details [Ready for Review] Frontend/post details Dec 5, 2025
@eric-kitagawa eric-kitagawa changed the title [Ready for Review] Frontend/post details [Ready for Review] Post Details Screen Dec 5, 2025
@danctila

danctila commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

😛

@danctila danctila left a comment

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.

fundamentally 🐐ed

@danctila danctila changed the title [Ready for Review] Post Details Screen Post Details Screen Dec 5, 2025
@danctila
danctila merged commit a1dc61e into main Dec 5, 2025
2 checks passed
@danctila
danctila deleted the frontend/post-details branch December 5, 2025 07:12
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.

2 participants