Skip to content

Added delete-buttons in html.file and method for delete.#2

Merged
SandraNelj merged 3 commits into
mainfrom
feature/deletemovie
Mar 16, 2026
Merged

Added delete-buttons in html.file and method for delete.#2
SandraNelj merged 3 commits into
mainfrom
feature/deletemovie

Conversation

@SandraNelj

@SandraNelj SandraNelj commented Mar 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a Delete action for each movie in the table, allowing users to remove movie entries directly from the list view.
  • Improvements

    • Updated the Duration column header to read "Duration (minutes)" for clearer time-unit indication.
  • Chores

    • Removed an internal automated code review workflow from the project configuration.

@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@SandraNelj has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 56da7c1e-aee9-4c40-bde9-3264e192f1be

📥 Commits

Reviewing files that changed from the base of the PR and between 75c4ae5 and 341bba1.

📒 Files selected for processing (2)
  • src/main/java/org/example/webapplab1/movies/MovieController.java
  • src/main/resources/templates/movies.html
📝 Walkthrough

Walkthrough

Updated the movies template: header "Duration" changed to "Duration (minutes)" and a new Delete action column was added. Also removed the GitHub Actions workflow file .github/workflows/code-review.yml.

Changes

Cohort / File(s) Summary
Movie Template
src/main/resources/templates/movies.html
Header text changed from "Duration" to "Duration (minutes)"; added a new table cell per row with a "Delete" link to /movies/delete/{id}; indentation/formatting adjusted.
CI Workflow Removal
.github/workflows/code-review.yml
Deleted the GitHub Actions workflow file that defined the "AI Code Review" workflow triggered on pull_request events.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title refers to adding delete-buttons and a delete method, which aligns with the primary change of introducing a Delete action column in the HTML template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/deletemovie
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/main/resources/templates/movies.html`:
- Around line 15-24: The table header is missing a column for the Delete action;
update the header row in the movies.html template (the <th> row that currently
contains "Duration (minutes)") to add a matching Actions header (e.g., add an
"Actions" <th>) so it lines up with the data cell containing the Delete link
generated by the th:each="movie : ${movies}" row.
- Around line 22-24: Replace the destructive GET link in movies.html
(th:href="@{/movies/delete/{id}(id=${movie.id})}") with a form POST (or form
POST + hidden _method=DELETE) that submits to a non-GET endpoint, and update the
controller mapping accordingly: change the controller method annotated with
`@GetMapping`("/movies/delete/{id}") to `@PostMapping`("/movies/{id}/delete") (or
`@DeleteMapping`("/movies/{id}")) and adjust the method signature to accept the id
path variable via `@PathVariable`; ensure the template form uses th:action to that
new URI, method="post" (or th:method="delete" with HiddenHttpMethodFilter) and
includes the CSRF token input so deletion is performed via POST/DELETE rather
than GET.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0bdbd4b0-d8b8-46e2-acc5-7a6b5f470f50

📥 Commits

Reviewing files that changed from the base of the PR and between bb787cf and 22935a2.

📒 Files selected for processing (1)
  • src/main/resources/templates/movies.html
📜 Review details
🔇 Additional comments (1)
src/main/resources/templates/movies.html (1)

15-15: Clearer duration header is a good change.

Line 15 improves unit clarity for users and avoids ambiguity.

Comment thread src/main/resources/templates/movies.html
Comment thread src/main/resources/templates/movies.html
@SandraNelj
SandraNelj merged commit be00c5b into main Mar 16, 2026
1 check passed
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