Skip to content

Adds specification guidance to results issue page - #1043

Merged
DilwoarH merged 1 commit into
mainfrom
954-display-guidance-content-snippets-on-check-results-page
Jun 30, 2025
Merged

Adds specification guidance to results issue page#1043
DilwoarH merged 1 commit into
mainfrom
954-display-guidance-content-snippets-on-check-results-page

Conversation

@DilwoarH

@DilwoarH DilwoarH commented May 27, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

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

Screenshot 2025-05-27 at 5 46 51 pm

After

Screenshot 2025-05-27 at 5 46 26 pm

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: Please replace this line with details on why tests have not been included
  • I need help with writing tests

QA sign off

  • Code has been checked and approved
  • Design has been checked and approved
  • Product and business logic has been checked and proved

[optional] Are there any post-deployment tasks we need to perform?

[optional] Are there any dependencies on other PRs or Work?

Summary by CodeRabbit

  • New Features
    • Enhanced the issue details page by displaying additional guidance and dataset information relevant to each issue.
    • Added new content to assist users in understanding and resolving specific data issues.

@DilwoarH DilwoarH linked an issue May 27, 2025 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 27, 2025

Copy link
Copy Markdown
Contributor

"""

Walkthrough

This 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

File(s) Change Summary
src/controllers/issueDetailsController.js Added middleware to fetch specification and dataset info, extract issue specification, and expose to downstream.
src/views/check/results/issueDetails.html Set new local variables and included an issue guidance partial in the template.

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
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement guidance snippets for issues shown on check results page (#954)

Possibly related PRs

Suggested reviewers

  • rosado

Poem

In the warren of code, a new path appears,
With guidance for issues, allaying our fears.
Middleware hops in, fetching details with care,
While templates now show advice everywhere.
🥕 The bunnies rejoice—support is in sight,
For fixing data issues, both day and night!
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 076d31e and 2bc6988.

📒 Files selected for processing (2)
  • src/controllers/issueDetailsController.js (2 hunks)
  • src/views/check/results/issueDetails.html (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/views/check/results/issueDetails.html
  • src/controllers/issueDetailsController.js
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: run-tests / test
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented May 27, 2025

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 66.41% 5956 / 8968
🔵 Statements 66.41% 5956 / 8968
🔵 Functions 64.87% 253 / 390
🔵 Branches 79.7% 758 / 951
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/controllers/issueDetailsController.js 63.41% 40% 11.11% 63.41% 34-35, 50-51, 63-76, 85, 90-108, 135-139, 142-148
Generated in workflow #1086 for commit 2bc6988 by the Vitest Coverage Report Action

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbb4541 and 076d31e.

📒 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.

Comment thread src/controllers/issueDetailsController.js
Comment thread src/controllers/issueDetailsController.js
Comment thread src/controllers/issueDetailsController.js
@DilwoarH
DilwoarH force-pushed the 954-display-guidance-content-snippets-on-check-results-page branch from 076d31e to 2bc6988 Compare June 30, 2025 21:54
@DilwoarH
DilwoarH merged commit 189c51a into main Jun 30, 2025
5 checks passed
@DilwoarH
DilwoarH deleted the 954-display-guidance-content-snippets-on-check-results-page branch June 30, 2025 22:15
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.

Display guidance content snippets on check results page

1 participant