Skip to content

fix: resolve 3D Perlin noise permutation table indexing error - #34

Closed
VarunikaShreeS wants to merge 1 commit into
DevSidd2006:mainfrom
VarunikaShreeS:patch-1
Closed

VarunikaShreeS wants to merge 1 commit into
DevSidd2006:mainfrom
VarunikaShreeS:patch-1

Conversation

@VarunikaShreeS

@VarunikaShreeS VarunikaShreeS commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue it fixes. Include relevant motivation and context.

This PR fixes an indexing error within the 3D Perlin noise permutation table to ensure correct table lookups and prevent out-of-bounds or incorrect noise generation values.

Screenshots (if visual change)

For any visual/UI change, add before & after screenshots or a short GIF.

Before After
(N/A) (N/A)

Type of change

Please delete options that are not relevant.

  • 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 not work as expected)
  • Documentation update
  • Refactoring / Code cleanup

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions so we can reproduce.

  • Automated tests run locally (pytest tests/ -v)
  • Tested in mock mode without external API keys (LLM_PROVIDER=mock)
  • UI tested across pages/ (if applicable)

Checklist:

  • I have performed a self-review of my own code
  • New and existing unit tests pass locally with my changes
  • I have not committed any secrets, API keys, credentials, or personal candidate data
  • AI tools are welcome, but I've reviewed and verified all AI-assisted content myself
  • For visual/UI changes, I've included before/after screenshots or a GIF above

Summary by Sourcery

Improve the shared page styling consistency and theme token organization without changing application functionality.

Enhancements:

  • Standardize and reformat the shared stylesheet for improved readability and maintainability while preserving existing behavior.
  • Add theme-aware success and informational border color tokens for reusable state styling.

@sourcery-ai

sourcery-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR does not contain a 3D Perlin noise permutation-table indexing fix; the supplied diff is primarily a CSS formatting cleanup with a small addition of theme-aware success/info border tokens in pages/css/style.css. Reviewers should verify whether the intended implementation diff is missing.

File-Level Changes

Change Details Files
Introduces additional semantic status border tokens and applies them to result tiles while preserving light and dark theme values.
  • Adds success and informational border variables for both themes.
  • Uses the new tokens for success/info result icon borders.
pages/css/style.css
Reformats the shared stylesheet for consistent readability without materially changing component behavior.
  • Expands compressed selectors and declarations across layout, navigation, forms, tables, modals, authentication, and responsive rules.
  • Separates grouped theme/status declarations and adds whitespace around sections.
pages/css/style.css

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

👋 Thanks for opening this PR! A maintainer will review it soon.

In the meantime, please make sure you've read CONTRIBUTING.md and filled out the PR template, including screenshots for any visual changes.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="pages/css/style.css" line_range="34" />
<code_context>
-  --info-bg:    #e1f3fe;  --info-text:    #1f6c9f;
+  --success-bg: #edf3ec;
+  --success-text: #346538;
+  --success-border: rgba(52, 101, 56, 0.18);
+
+  --danger-bg: #fdebec;
</code_context>
<issue_to_address>
**issue:** The status-token additions define `--success-border` and `--info-border` but omit `--danger-border` and `--warning-border`, even though `openbox.html` and `leaderboard.html` use those variables. Critical, high-severity, and warning tags therefore receive an invalid `border-color` declaration and retain the default border instead of their status-specific border.

**Triggers:** When OpenBox or leaderboard renders critical, high, or warning status tags.

**Suggested fix:** Define `--danger-border` and `--warning-border` in both the light and dark theme token blocks, or replace those usages with defined variables.
</issue_to_address>

### Comment 2
<location path="pages/css/style.css" line_range="34" />
<code_context>
-  --info-bg:    #e1f3fe;  --info-text:    #1f6c9f;
+  --success-bg: #edf3ec;
+  --success-text: #346538;
+  --success-border: rgba(52, 101, 56, 0.18);
+
+  --danger-bg: #fdebec;
</code_context>
<issue_to_address>
**issue (broader_impact):** The diff changes only CSS tokens and formatting; it does not modify any 3D Perlin noise implementation or permutation-table lookup. The advertised 3D Perlin indexing bug therefore remains unfixed.

**Suggested fix:** Include the actual 3D Perlin noise implementation change that corrects the permutation-table indexing, or update the PR title and description to match this CSS-only change.
</issue_to_address>

Sourcery assessment

Approval pending. 2 findings to address first.

Blocking findings: pages/css/style.css:34, pages/css/style.css:34


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread pages/css/style.css
--info-bg: #e1f3fe; --info-text: #1f6c9f;
--success-bg: #edf3ec;
--success-text: #346538;
--success-border: rgba(52, 101, 56, 0.18);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue: The status-token additions define --success-border and --info-border but omit --danger-border and --warning-border, even though openbox.html and leaderboard.html use those variables. Critical, high-severity, and warning tags therefore receive an invalid border-color declaration and retain the default border instead of their status-specific border.

Triggers: When OpenBox or leaderboard renders critical, high, or warning status tags.

Suggested fix: Define --danger-border and --warning-border in both the light and dark theme token blocks, or replace those usages with defined variables.

Comment thread pages/css/style.css
--info-bg: #e1f3fe; --info-text: #1f6c9f;
--success-bg: #edf3ec;
--success-text: #346538;
--success-border: rgba(52, 101, 56, 0.18);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (broader_impact): The diff changes only CSS tokens and formatting; it does not modify any 3D Perlin noise implementation or permutation-table lookup. The advertised 3D Perlin indexing bug therefore remains unfixed.

Suggested fix: Include the actual 3D Perlin noise implementation change that corrects the permutation-table indexing, or update the PR title and description to match this CSS-only change.

@DevSidd2006 DevSidd2006 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

  • Define --danger-border and --warning-border in both the light and dark theme token blocks, or replace those usages with defined variables.
  • Include the actual 3D Perlin noise implementation change that corrects the permutation-table indexing, or update the PR title and description to match this CSS-only change.

Address above flags and you are good to go.

@DevSidd2006
DevSidd2006 self-requested a review October 28, 2026 16:08

@DevSidd2006 DevSidd2006 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the contribution! The PR title and description refer to a 3D Perlin-noise indexing fix, but the submitted patch only reformats pages/css/style.css and adds success/info border color tokens.

Those missing tokens have already been added to main in commit 65ee924, so the functional change is now resolved. The remaining patch is a large formatting-only rewrite that would create unnecessary churn in the shared stylesheet.

I’m closing this PR as already addressed. Thank you!

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