Skip to content

Changed footer to also show SLA#199

Merged
Aleksandergreg merged 5 commits into
mainfrom
dev
Jun 24, 2025
Merged

Changed footer to also show SLA#199
Aleksandergreg merged 5 commits into
mainfrom
dev

Conversation

@Luke3520
Copy link
Copy Markdown
Contributor

@Luke3520 Luke3520 commented Jun 24, 2025

Description

Changed footer to also show SLA, as the users didn't have any way of reaching this endpoint, but by typing it manually.

Related Issue:
Fixes #197

Type of Change

  • Bug fix: Non-breaking change which fixes an issue.
  • New feature: Non-breaking change which adds functionality.
  • Breaking change: Fix or feature that would cause existing functionality to change.
  • Documentation update: Changes to documentation only.

How Has This Been Tested?

It has been ran locally in our Docker.dev enviroment, to ensure that the link works properly.

Checklist

Before creating this pull request, please ensure that your code meets the following requirements:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

  • Chores
    • Improved code quality checks by enforcing stricter linting rules in the continuous integration workflow.
    • Added configuration to customize and disable certain style and complexity warnings in the codebase.
  • Style
    • Minor spacing adjustment in the footer layout for improved formatting.

@Luke3520 Luke3520 requested a review from Aleksandergreg June 24, 2025 07:46
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented Jun 24, 2025

Here's the code health analysis summary for commits fb69a7f..b9d2675. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Ruby LogoRuby✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@Aleksandergreg Aleksandergreg added the ruby Pull requests that update ruby code label Jun 24, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 24, 2025

Walkthrough

The pull request introduces a .rubocop.yml configuration file to disable several RuboCop cops and exclude specific paths, modifies the CI workflow to enforce RuboCop linting failures, and adds trailing whitespace after the "About" link in the footer of the main layout template. No new hyperlinks or functionality were added.

Changes

File(s) Change Summary
.github/workflows/ci.yaml Removed `
sinatra/.rubocop.yml Added RuboCop config disabling multiple cops and excluding certain paths
sinatra/views/layout.erb Added trailing whitespace after the "About" hyperlink in the footer

Assessment against linked issues

Objective Addressed Explanation
Add "SLA" hyperlink to footer (#197) No addition of an "SLA" hyperlink in the footer was made.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
RuboCop configuration and CI workflow changes (.github/workflows/ci.yaml, sinatra/.rubocop.yml) These changes relate to code quality enforcement and are unrelated to adding an SLA hyperlink.
Trailing whitespace addition in layout.erb Minor formatting change unrelated to adding the SLA hyperlink as requested in #197.

Possibly related PRs

Poem

A space was left, a gentle trace,
After "About" in footer's place.
No SLA link to find today,
Just whitespace softly tucked away.
🐇✨
Code neat and tidy, though not quite right,
The rabbit hops on through the night!


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.

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.

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: 0

🧹 Nitpick comments (1)
sinatra/views/layout.erb (1)

42-46: Tweak footer for accessibility & future-proofing

  1. Hard-coding the year to “2025” will require manual updates each January.
  2. The acronym “SLA” is not self-describing for assistive tech; wrapping it in <abbr> (or adding a title attribute) improves accessibility.
  3. A small visual separator keeps the two links from running together.
-  <span>DynaSearch 🧨 &copy; 2025</span>
-  <a href="/about">About</a>
-  <a href="/sla">SLA</a>
+  <span>DynaSearch 🧨 &copy; <%= Time.now.year %></span>
+  <a href="/about">About</a><span> | </span>
+  <a href="/sla"><abbr title="Service Level Agreement">SLA</abbr></a>

Ensure the /sla route/template exists and is linked into app.rb; otherwise this link will 404.

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fb69a7f and 24bba72.

📒 Files selected for processing (1)
  • sinatra/views/layout.erb (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: e2e

Aleksandergreg and others added 2 commits June 24, 2025 15:55
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: 2

🧹 Nitpick comments (2)
sinatra/.rubocop.yml (1)

26-26: Add a newline at EOF to satisfy linters

YAML-lint reports “no new line character at the end of file”.
Add a trailing newline to avoid CI noise.

 Metrics/ClassLength:
   Enabled: false
+
.github/workflows/ci.yaml (1)

67-67: Remove trailing whitespace to keep YAML valid

Line 67 has a dangling space that YAML-lint flags.

-        run: bundle exec rubocop -A 
+        run: bundle exec rubocop -A
📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24bba72 and b9d2675.

📒 Files selected for processing (3)
  • .github/workflows/ci.yaml (1 hunks)
  • sinatra/.rubocop.yml (1 hunks)
  • sinatra/views/layout.erb (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • sinatra/views/layout.erb
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yaml

[error] 67-67: trailing spaces

(trailing-spaces)

sinatra/.rubocop.yml

[error] 26-26: no new line character at the end of file

(new-line-at-end-of-file)

Comment thread sinatra/.rubocop.yml
Comment on lines +8 to +26
# Ignore line length warnings
Layout/LineLength:
Enabled: false

# Ignore warnings about blocks being too long
Metrics/BlockLength:
Enabled: false

# Ignore warnings about methods being too long
Metrics/MethodLength:
Enabled: false

# Ignore warnings about assignment, branch, and condition size
Metrics/AbcSize:
Enabled: false

# Ignore warnings about classes being too long
Metrics/ClassLength:
Enabled: false No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Re-enable metrics cops instead of blanket disabling them

Turning off LineLength, BlockLength, MethodLength, AbcSize, and ClassLength removes most objective safeguards against large, complex, and unreadable code.
If the default thresholds are too strict, prefer custom limits:

-Layout/LineLength:
-  Enabled: false
+Layout/LineLength:
+  Max: 120        # or any project-agreed width

…repeat for the other cops with Max, Count, or ExcludedMethods instead of Enabled: false.

This keeps CI protection while giving the team flexibility.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Ignore line length warnings
Layout/LineLength:
Enabled: false
# Ignore warnings about blocks being too long
Metrics/BlockLength:
Enabled: false
# Ignore warnings about methods being too long
Metrics/MethodLength:
Enabled: false
# Ignore warnings about assignment, branch, and condition size
Metrics/AbcSize:
Enabled: false
# Ignore warnings about classes being too long
Metrics/ClassLength:
Enabled: false
# Ignore line length warnings
Layout/LineLength:
Max: 120 # or any project-agreed width
# Ignore warnings about blocks being too long
Metrics/BlockLength:
Enabled: false
# Ignore warnings about methods being too long
Metrics/MethodLength:
Enabled: false
# Ignore warnings about assignment, branch, and condition size
Metrics/AbcSize:
Enabled: false
# Ignore warnings about classes being too long
Metrics/ClassLength:
Enabled: false
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 26-26: no new line character at the end of file

(new-line-at-end-of-file)

🤖 Prompt for AI Agents
In sinatra/.rubocop.yml between lines 8 and 26, the metrics cops for LineLength,
BlockLength, MethodLength, AbcSize, and ClassLength are completely disabled by
setting Enabled to false. Instead of disabling them, re-enable these cops and
configure custom thresholds using parameters like Max, Count, or ExcludedMethods
to relax the rules as needed. This maintains code quality checks while allowing
flexibility, so replace Enabled: false with appropriate custom limit settings
for each cop.

Comment thread .github/workflows/ci.yaml
Comment on lines 65 to 72
- name: Auto-correct RuboCop issues
working-directory: sinatra
run: bundle exec rubocop -A || true
run: bundle exec rubocop -A

- name: Run RuboCop
working-directory: sinatra
run: bundle exec rubocop || true
run: bundle exec rubocop

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Running rubocop -A in CI silently rewrites code

rubocop -A performs in-place auto-corrections.
Because the CI workspace is thrown away, those changes are never committed, yet the step can pass while masking offences that needed manual review.

Safer pattern:

-      - name: Auto-correct RuboCop issues
-        working-directory: sinatra
-        run: bundle exec rubocop -A
-
-      - name: Run RuboCop
+      - name: Run RuboCop
         working-directory: sinatra
-        run: bundle exec rubocop
+        run: bundle exec rubocop --parallel

Developers can run rubocop -A locally; CI should only fail or pass.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Auto-correct RuboCop issues
working-directory: sinatra
run: bundle exec rubocop -A || true
run: bundle exec rubocop -A
- name: Run RuboCop
working-directory: sinatra
run: bundle exec rubocop || true
run: bundle exec rubocop
- name: Run RuboCop
working-directory: sinatra
run: bundle exec rubocop --parallel
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 67-67: trailing spaces

(trailing-spaces)

🤖 Prompt for AI Agents
In .github/workflows/ci.yaml around lines 65 to 72, the CI step runs `rubocop
-A` which auto-corrects code in place, but these changes are not committed and
can mask offenses. Remove the `rubocop -A` step from the CI workflow so it only
runs `rubocop` to check for offenses without modifying files. Developers can
still run `rubocop -A` locally to fix issues before committing.

@Aleksandergreg Aleksandergreg merged commit 9619b25 into main Jun 24, 2025
7 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in DevOps search engine Jun 24, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jun 25, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Pull requests that update ruby code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Make footer contain SLA hyperlink

2 participants