Skip to content

[Cleanup] Remove old sass#6

Open
phenchaw wants to merge 1 commit into
masterfrom
cleanup/remove-sass
Open

[Cleanup] Remove old sass#6
phenchaw wants to merge 1 commit into
masterfrom
cleanup/remove-sass

Conversation

@phenchaw

@phenchaw phenchaw commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Removed sass dependency, tilt should use dartsass

Greptile Summary

This PR removes the sass gem dependency from aub-payroll.gemspec without adding a replacement SCSS engine. However, the project still contains an active style.scss template (lib/aub/payroll/summary_file/templates/style.scss) that is rendered at runtime via Tilt in html_generator.rb. Without a registered SCSS handler (provided by gems like dartsass-ruby or sassc), this will cause a runtime RuntimeError whenever a summary PDF is generated, breaking a core feature of the gem.

Critical issue: No replacement SCSS-processing dependency was added before removing sass.

Confidence Score: 1/5

  • Not safe to merge — removing sass without adding a replacement SCSS engine will cause runtime failures when generating PDFs.
  • The PR removes the only SCSS-processing gem (sass) while leaving active SCSS template rendering code in place. This will cause RuntimeError whenever html_generator.rb attempts to render style.scss via Tilt, breaking PDF generation — a core feature of this gem. No replacement dependency (e.g., dartsass-ruby, sassc) is provided.
  • aub-payroll.gemspec — must add an SCSS engine gem before the sass removal is safe.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant HTMLGenerator
    participant Tilt
    participant SassEngine

    Caller->>HTMLGenerator: generate()
    HTMLGenerator->>Tilt: Tilt.new("style.scss")
    Tilt->>SassEngine: lookup SCSS handler
    Note over SassEngine: ❌ No sass/dartsass gem present<br/>after this PR — Tilt raises RuntimeError
    SassEngine-->>Tilt: handler not found
    Tilt-->>HTMLGenerator: RuntimeError
    HTMLGenerator-->>Caller: Exception propagates
Loading

Last reviewed commit: 381b0e7

Context used:

  • Rule from dashboard - CLAUDE.md (source)

@phenchaw phenchaw self-assigned this Mar 4, 2026
@phenchaw phenchaw changed the title Removed sass dependency, tilt should use dartsass [Cleanup] Remove old sass Mar 4, 2026
Comment thread aub-payroll.gemspec
spec.add_dependency 'tilt'
spec.add_dependency 'slim'
spec.add_dependency 'sass'
spec.add_dependency 'configurations', '~> 2.2.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing SCSS engine dependency after removing sass gem

The sass gem is removed here, but no Dart Sass gem is added as a replacement. The project still has a style.scss template (lib/aub/payroll/summary_file/templates/style.scss) that is rendered at runtime via Tilt in html_generator.rb:

render 'style.scss', 'style.css'

This calls Tilt.new(template_path).render(self) at line 41, which requires a registered template handler for SCSS. Without a gem that provides an SCSS engine (such as dartsass-ruby), Tilt will raise a RuntimeError: Could not find Tilt template handler for 'scss' when this code executes, breaking PDF generation.

The fix should add a Dart Sass gem dependency:

Suggested change
spec.add_dependency 'configurations', '~> 2.2.0'
spec.add_dependency 'dartsass-ruby'
spec.add_dependency 'configurations', '~> 2.2.0'
end

Alternatively, sassc (LibSass) is also a valid SCSS processor.

Prompt To Fix With AI
This is a comment left during a code review.
Path: aub-payroll.gemspec
Line: 37

Comment:
Missing SCSS engine dependency after removing `sass` gem

The `sass` gem is removed here, but no Dart Sass gem is added as a replacement. The project still has a `style.scss` template (`lib/aub/payroll/summary_file/templates/style.scss`) that is rendered at runtime via Tilt in `html_generator.rb`:

```ruby
render 'style.scss', 'style.css'
```

This calls `Tilt.new(template_path).render(self)` at line 41, which requires a registered template handler for SCSS. Without a gem that provides an SCSS engine (such as `dartsass-ruby`), Tilt will raise a `RuntimeError: Could not find Tilt template handler for 'scss'` when this code executes, breaking PDF generation.

The fix should add a Dart Sass gem dependency:

```suggestion
  spec.add_dependency 'dartsass-ruby'
  spec.add_dependency 'configurations', '~> 2.2.0'
end
```

Alternatively, `sassc` (LibSass) is also a valid SCSS processor.

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant