Skip to content

adjustments#82

Merged
PanchoBubble merged 1 commit intomainfrom
asic-modal
Dec 15, 2025
Merged

adjustments#82
PanchoBubble merged 1 commit intomainfrom
asic-modal

Conversation

@PanchoBubble
Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @PanchoBubble, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on cleaning up the application by deprecating and removing the Tari ASIC promotional modal UI. It also refines the state management logic responsible for automatically displaying this modal, making its appearance more prompt and its activation conditions more straightforward.

Highlights

  • TariASICModal Removal: The TariASICModal React component and its corresponding styled-components definitions have been completely removed from the codebase. This indicates the modal is no longer in use or has been replaced by a different implementation.
  • ASIC Modal Store Logic Adjustment: The initAutoOpen function within the useASICModalStore has been modified. The auto-open delay for the modal has been reduced from 3 seconds to 1 second, and the logic for determining when to auto-open has been simplified to primarily check if the modal is not already open.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@PanchoBubble PanchoBubble merged commit 28876c8 into main Dec 15, 2025
3 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request removes the old TariASICModal and its associated styles, and updates the useASICModalStore to manage the auto-opening of the new ASICPromoModal. While the removal of old components is good for cleanup, the refactoring of the initAutoOpen function in the store introduces a critical logical flaw that will cause the promo modal to auto-open repeatedly. Additionally, the presence of redundant state variables and commented-out code indicates incomplete refactoring.

Comment on lines +24 to +25
// const { hasAutoOpened, isClient } = get();
const { isOpen } = get();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The initAutoOpen function's new logic for determining when to auto-open the modal is missing a crucial check. Previously, the hasAutoOpened state and a localStorage item (ASIC_PROMO_KEY) were used to ensure the modal only appeared once per user. The current if (!isOpen) condition will cause the modal to auto-open every time initAutoOpen is called if the modal is not already open, regardless of whether the user has seen and closed it before. This will lead to a repetitive and poor user experience.

Suggested change
// const { hasAutoOpened, isClient } = get();
const { isOpen } = get();
const { hasAutoOpened } = get();
const hasBeenShown = localStorage.getItem(ASIC_PROMO_KEY);

Comment on lines +31 to 36
if (!isOpen) {
setTimeout(() => {
set({ isOpen: true, hasAutoOpened: true });
localStorage.setItem(ASIC_PROMO_KEY, 'true');
}, 1000);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This block implements the new auto-open logic, but it currently only checks !isOpen. To prevent the modal from repeatedly appearing, it needs to incorporate the hasAutoOpened state and the hasBeenShown status from localStorage (as defined in the previous suggestion). Without these checks, the modal will continuously re-appear, which is likely not the intended behavior for a promo.

Suggested change
if (!isOpen) {
setTimeout(() => {
set({ isOpen: true, hasAutoOpened: true });
localStorage.setItem(ASIC_PROMO_KEY, 'true');
}, 1000);
}
if (!hasAutoOpened && !hasBeenShown) {
setTimeout(() => {
set({ isOpen: true, hasAutoOpened: true });
localStorage.setItem(ASIC_PROMO_KEY, 'true');
}, 1000);
}

Comment on lines +38 to +52
// if (!isClient) {
// set({ isClient: true });
// }
//
// if (!hasAutoOpened && isClient) {
// const hasBeenShown = localStorage.getItem(ASIC_PROMO_KEY);
//
// if (!hasBeenShown) {
// setTimeout(() => {
// set({ isOpen: true, hasAutoOpened: true });
// localStorage.setItem(ASIC_PROMO_KEY, 'true');
// }, 1000);
// }
//
// set({ hasAutoOpened: true });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This large block of commented-out code should be removed. It clutters the codebase, makes it harder to read, and suggests incomplete cleanup after refactoring. If the code is no longer needed, it should be deleted.

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.

1 participant