Skip to content

fix: Create table view for all films - #6

Open
webbrain-one wants to merge 1 commit into
yiqu:masterfrom
webbrain-one:webbrain/issue-4
Open

fix: Create table view for all films#6
webbrain-one wants to merge 1 commit into
yiqu:masterfrom
webbrain-one:webbrain/issue-4

Conversation

@webbrain-one

@webbrain-one webbrain-one commented Aug 18, 2026

Copy link
Copy Markdown

Closes #4

Patch generated by qwen3.8-27b-nvfp4 via local API.


Summary by cubic

Adds AllFilmsTable to render all Star Wars films in a material table for quick scan and navigation. Previously there was no table view; now we show Title, Episode, Director, and formatted Release Date, with Title linking to the film detail route.

  • Title links to ./${filmId} using react-router-dom; confirm the parent route supports relative ./:id navigation.
  • Film ID is parsed from film.url by taking the last path segment; if the API URL ends with a trailing slash, this will be empty—verify sample data or switch to the next-to-last segment.
  • Dates use DateDisplay with format "MMM Do YYYY"; ensure required date plugins/locales are loaded.

Written for commit 0eb4375. Summary will update on new commits.

Review in cubic

Closes yiqu#4

Patch generated by qwen3.8-27b-nvfp4 via local API.
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 59e4fc9d-b66d-4d60-a4d0-603872aaa06f


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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/core/movies/movies/AllFilmsTable.tsx">

<violation number="1" location="src/core/movies/movies/AllFilmsTable.tsx:12">
P1: Because no module renders `AllFilmsTable`, users never get the table view promised by this change. Add it to the `Movies` display path and pass the fetched film properties to it.</violation>

<violation number="2" location="src/core/movies/movies/AllFilmsTable.tsx:47">
P2: `DateDisplay` keeps its default `fromNow={true}`, so the `format` prop is ignored in the visible cell and Release Date renders relatively. Pass `fromNow={false}` to render the formatted release date.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic


const COLUMNS = [ "Title", "Episode", "Director", "Release Date" ];

export default function AllFilmsTable({ films }: AllFilmsTableProps) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Because no module renders AllFilmsTable, users never get the table view promised by this change. Add it to the Movies display path and pass the fetched film properties to it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/movies/movies/AllFilmsTable.tsx, line 12:

<comment>Because no module renders `AllFilmsTable`, users never get the table view promised by this change. Add it to the `Movies` display path and pass the fetched film properties to it.</comment>

<file context>
@@ -0,0 +1,58 @@
+
+const COLUMNS = [ "Title", "Episode", "Director", "Release Date" ];
+
+export default function AllFilmsTable({ films }: AllFilmsTableProps) {
+
+  const getFilmId = (film: StarwarsFilm): string => {
</file context>

<TableCell>{ film.episode_id }</TableCell>
<TableCell>{ film.director }</TableCell>
<TableCell>
<DateDisplay date={ film.release_date } format="MMM Do YYYY" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: DateDisplay keeps its default fromNow={true}, so the format prop is ignored in the visible cell and Release Date renders relatively. Pass fromNow={false} to render the formatted release date.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/movies/movies/AllFilmsTable.tsx, line 47:

<comment>`DateDisplay` keeps its default `fromNow={true}`, so the `format` prop is ignored in the visible cell and Release Date renders relatively. Pass `fromNow={false}` to render the formatted release date.</comment>

<file context>
@@ -0,0 +1,58 @@
+                    <TableCell>{ film.episode_id }</TableCell>
+                    <TableCell>{ film.director }</TableCell>
+                    <TableCell>
+                      <DateDisplay date={ film.release_date } format="MMM Do YYYY" />
+                    </TableCell>
+                  </TableRow>
</file context>

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.

Create table view for all films

1 participant