Skip to content

Added searchSettings to TwoDeepEntityPage and ResponsesController#1021

Merged
Isti01 merged 2 commits intostagingfrom
feature/search-submissions
Mar 28, 2026
Merged

Added searchSettings to TwoDeepEntityPage and ResponsesController#1021
Isti01 merged 2 commits intostagingfrom
feature/search-submissions

Conversation

@SzBeni2003
Copy link
Copy Markdown
Contributor

@SzBeni2003 SzBeni2003 commented Mar 26, 2026

Summary by CodeRabbit

  • New Features

    • Added search configuration for form responses management in the admin interface, including inner/nested response views.
  • Refactor

    • Updated initialization so inner response views receive and expose their search settings for consistent search behavior.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 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: 0f4faf43-fa2f-40d4-bc2e-03b74944d87e

📥 Commits

Reviewing files that changed from the base of the PR and between 0b68914 and af3b03c.

📒 Files selected for processing (2)
  • backend/src/main/kotlin/hu/bme/sch/cmsch/component/form/ResponsesController.kt
  • backend/src/main/kotlin/hu/bme/sch/cmsch/controller/admin/TwoDeepEntityPage.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • backend/src/main/kotlin/hu/bme/sch/cmsch/component/form/ResponsesController.kt
  • backend/src/main/kotlin/hu/bme/sch/cmsch/controller/admin/TwoDeepEntityPage.kt

📝 Walkthrough

Walkthrough

TwoDeepEntityPage gained an optional innerSearchSettings constructor parameter that is exposed to the inner "/view/{id}" handler via the page model. ResponsesController now computes and passes calculateSearchSettings<ResponseEntity>(false) as that new argument when instantiating TwoDeepEntityPage.

Changes

Cohort / File(s) Summary
ResponsesController update
backend/src/main/kotlin/hu/bme/sch/cmsch/component/form/ResponsesController.kt
Passes a newly computed innerSearchSettings (calculateSearchSettings<ResponseEntity>(false)) into TwoDeepEntityPage constructor.
TwoDeepEntityPage constructor and handler
backend/src/main/kotlin/hu/bme/sch/cmsch/controller/admin/TwoDeepEntityPage.kt
Added innerSearchSettings: SearchSettings? = null private constructor parameter; inner "/view/{id}" handler sets model["searchSettings"] = innerSearchSettings. Adjusted superclass initialization call to match new parameter ordering.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nudged a setting, soft and neat,
Down into pages where responses meet,
A tiny search to guide the way,
Hop, hop—results now find their day,
Sniffing logic sweet as springtime treat.

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Added searchSettings to TwoDeepEntityPage and ResponsesController' directly and accurately summarizes the main change: adding searchSettings configuration to two key classes.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/search-submissions

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

@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: 1

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

Inline comments:
In
`@backend/src/main/kotlin/hu/bme/sch/cmsch/controller/admin/TwoDeepEntityPage.kt`:
- Around line 65-67: TwoDeepEntityPage's constructor accepts searchSettings but
the two view handlers do not add it to the model before rendering overview4, so
templates never receive the setting; update both view handler implementations
inside TwoDeepEntityPage to put the searchSettings into the model (use the same
model key / pattern used in OneDeepEntityPage where overview4 is rendered) when
searchSettings != null, ensuring the model passed to render("overview4", model)
includes the search configuration; reference TwoDeepEntityPage, the view
handlers that call render("overview4", ...) and the constructor parameter
searchSettings to locate where to add the model entry.
🪄 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: 458b43aa-32fb-4eb4-9a6c-3dfdd847571d

📥 Commits

Reviewing files that changed from the base of the PR and between 9fd7665 and 0b68914.

📒 Files selected for processing (2)
  • backend/src/main/kotlin/hu/bme/sch/cmsch/component/form/ResponsesController.kt
  • backend/src/main/kotlin/hu/bme/sch/cmsch/controller/admin/TwoDeepEntityPage.kt

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmsch-cst Ready Ready Preview, Comment Mar 26, 2026 11:54am
cmsch-golyakorte Ready Ready Preview, Comment Mar 26, 2026 11:54am
cmsch-skktv Ready Ready Preview, Comment Mar 26, 2026 11:54am

Request Review

@Isti01 Isti01 merged commit 7f149a5 into staging Mar 28, 2026
13 checks 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.

2 participants