Adds specification guidance to results issue page - #1043
Conversation
|
""" WalkthroughThis change adds middleware to the issue details controller to fetch and process specification and dataset information, making issue-specific guidance available in the request context. The issue details page template is updated to display this guidance by including a new partial and setting relevant local variables. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Router
participant issueDetailsController
participant DB
participant Template
User->>Router: Request issue details page
Router->>issueDetailsController: Invoke middleware chain
issueDetailsController->>DB: fetchSpecification (by data subject)
issueDetailsController->>DB: fetchDatasetInfo (by data subject)
issueDetailsController->>issueDetailsController: getIssueSpecification(process fetched data)
issueDetailsController->>Template: Render with issueSpecification and datasetDetails
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/controllers/issueDetailsController.js(2 hunks)src/views/check/results/issueDetails.html(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/controllers/issueDetailsController.js (3)
src/middleware/middleware.builders.js (1)
fetchOne(273-275)src/middleware/common.middleware.js (1)
getIssueSpecification(683-693)src/utils/errors.js (1)
MiddlewareError(17-34)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: run-tests / test
🔇 Additional comments (2)
src/controllers/issueDetailsController.js (1)
116-118: Verify middleware ordering is optimal.The new middlewares are positioned correctly before the existing result processing middlewares, ensuring the specification data is available for downstream processing.
src/views/check/results/issueDetails.html (1)
74-77: Template changes look good.The template correctly sets local variables from the controller-provided options and includes the guidance partial in the appropriate location within the page structure.
076d31e to
2bc6988
Compare
What type of PR is this? (check all applicable)
Description
Implement guidance snippets for issues shown on check results page
We want to show the guidance snippets so users can fix it. It has been implemented everywhere else; this is just the remaining.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Before
After
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above.
QA sign off
[optional] Are there any post-deployment tasks we need to perform?
[optional] Are there any dependencies on other PRs or Work?
Summary by CodeRabbit