Skip to content

Conversation

@merendamattia
Copy link
Owner

Refactor the application to address the issue of the page scrolling to the top after portfolio analysis completion. Implement a smooth scroll to the relevant section, enhancing user experience. Clean up the scroll function and ensure robust percentage calculations in the portfolio model.

Fixes #21

Copy link

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 fixes the issue where the page scrolls to the top after portfolio analysis completion by implementing JavaScript-based smooth scrolling to the bottom of the page. Additionally, it refactors the portfolio percentage validation from an error-throwing validator to an auto-normalization approach.

  • Implements JavaScript scroll functionality to automatically scroll to bottom after portfolio completion
  • Refactors portfolio percentage validation from strict validation to auto-normalization
  • Moves chat input placement before the conversation completion check

Reviewed Changes

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

File Description
src/models/portfolio.py Replaces strict percentage validation with auto-normalization logic; adds unused math import; includes commented-out old code and TODO comment
app.py Adds _scroll_to_bottom() function using JavaScript injection; reorganizes chat input placement; adds scroll call after portfolio display

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

@merendamattia merendamattia merged commit 9a6ef61 into main Nov 19, 2025
5 checks passed
@merendamattia merendamattia deleted the issues_solver branch November 19, 2025 10:49
@merendamattia
Copy link
Owner Author

🎉 This PR is included in version 1.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Page Scrolls to Top After Portfolio and PAC Analysis Completion

1 participant