Skip to content

General Panel tweaks#39

Open
loriab wants to merge 6 commits intogt-sse-center:masterfrom
loriab:config_tweaks_rb1
Open

General Panel tweaks#39
loriab wants to merge 6 commits intogt-sse-center:masterfrom
loriab:config_tweaks_rb1

Conversation

@loriab
Copy link
Copy Markdown
Collaborator

@loriab loriab commented Dec 9, 2025

Description

some changes after poking around the General panel of config tab

Changes

  • Add debug/production options to iris launch. Upon debug=T, have the "Save Complete Configuration" button print the config to console.
  • Break up the "images.path" advice. Better proportion key/value in input dict.
  • Label fields in images.shape better
  • Run the path/{id} validation through a loop so that it catches 2nd and further dict item errors. IDs are still accumulating from just the 1st dict entry. Could check that all the sets of IDs are the same, but not done here.
  • Duplicate error banner near the Save button for better visibility. (I really thought only the console log got the errors before this.)
  • Added new feature
  • Fixed bug
  • Updated documentation
  • Added tests

Demo

Screenshot 2025-12-10 at 2 54 55 AM Screenshot 2025-12-10 at 3 24 44 AM Screenshot 2025-12-10 at 3 24 19 AM

Related Issue

Closes #[issue_number]

Additional Notes

Any additional context or notes for reviewers.

Copilot AI review requested due to automatic review settings December 9, 2025 22:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces debug mode support, improves the configuration UI with better documentation and responsive styling, and adds path normalization for backward compatibility with single-string image paths.

  • Adds debug mode CLI flags and API exposure for conditional debug logging in the frontend
  • Improves configuration UI with clearer documentation, better examples, and percentage-based responsive styling
  • Normalizes legacy single-string image paths to dictionary format for consistent handling

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
iris/cli.py Adds --debug and --production CLI options to the launch command
iris/api/routes/config.py Exposes debug flag in the project config API response
iris/project.py Adds path normalization logic to convert single-string image paths to dictionary format
iris/tests/test_api_config.py Adds test coverage for debug flag and path normalization functionality
src/components/preferences/ProjectConfigTab.tsx Implements conditional debug logging based on server debug mode
src/components/preferences/config/PathListEditor.tsx Updates styling from fixed width to percentage-based responsive design
src/components/preferences/config/GeneralSection.tsx Improves documentation with restructured help text, clearer examples, and better field labels
Comments suppressed due to low confidence (1)

iris/project.py:71

  • Unnecessary 'pass' statement.
            pass

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread iris/project.py Outdated
Comment thread iris/project.py
Comment thread src/components/preferences/config/GeneralSection.tsx
Comment thread src/components/preferences/config/PathListEditor.tsx Outdated
Comment thread iris/project.py
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 10, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
iris/project.py 78.94% 4 Missing ⚠️
iris/cli.py 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
iris/api/routes/config.py 89.95% <100.00%> (+0.19%) ⬆️
iris/cli.py 0.00% <0.00%> (ø)
iris/project.py 80.41% <78.94%> (+0.48%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings December 10, 2025 07:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/preferences/ProjectConfigTab.tsx Outdated
Comment thread iris/project.py Outdated
Comment thread iris/project.py Outdated
Comment thread iris/tests/test_api_config_validation.py Outdated
Comment thread src/components/preferences/config/GeneralSection.tsx Outdated
Comment thread src/components/preferences/config/GeneralSection.tsx Outdated
Comment thread src/components/preferences/ProjectConfigTab.tsx Outdated
@loriab loriab changed the title Config tweaks rb1 General Panel tweaks Dec 10, 2025
@loriab loriab requested a review from rfievet December 10, 2025 08:27
Comment thread iris/project.py
@loriab loriab marked this pull request as ready for review December 10, 2025 20:28
Copilot AI review requested due to automatic review settings December 10, 2025 20:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread iris/project.py
Comment on lines +197 to +198
regex_images.match(image_path).groups()[0]
for image_path in images
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

Variable shadowing issue: the loop variable 'image_path' on line 178 is being reused inside the loop at lines 197-198 for the list comprehension iteration variable. This shadows the outer loop variable, which means the exception message on line 202 will reference the last item from the 'images' list instead of the original 'image_path' from the outer loop. Consider renaming the inner loop variable to something like 'img_file' to avoid confusion and ensure error messages are accurate.

Suggested change
regex_images.match(image_path).groups()[0]
for image_path in images
regex_images.match(img_file).groups()[0]
for img_file in images

Copilot uses AI. Check for mistakes.
Comment on lines +267 to +268
const msg = `Validation failed: ${validationResult.errors.join('\n')}`;
setError(msg);
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The error message uses '\n' for line breaks, but these won't be rendered as line breaks in the HTML div element. To display multi-line error messages properly, either add a CSS style like 'whiteSpace: "pre-wrap"' to the error div elements (lines 316-326 and 352-361), or split the error string by '\n' and render each line as a separate element with
tags between them.

Copilot uses AI. Check for mistakes.
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.

4 participants