Skip to content

feat(tamagotchi): add "Pin on top" toggle to controls island#1183

Merged
nekomeowww merged 2 commits intomoeru-ai:mainfrom
lietblue:always-on-top
Mar 9, 2026
Merged

feat(tamagotchi): add "Pin on top" toggle to controls island#1183
nekomeowww merged 2 commits intomoeru-ai:mainfrom
lietblue:always-on-top

Conversation

@lietblue
Copy link
Contributor

@lietblue lietblue commented Mar 7, 2026

  • Implement "Always on Top" window management via a new IPC event.
  • Add alwaysOnTop state to the settings store (defaults to true in memory).
  • Add a toggle button to the Control Island expanded menu with status-aware icons.
  • Support translations for English, Simplified Chinese, and Japanese.
image image

- Implement "Always on Top" window management via a new IPC event.
- Add `alwaysOnTop` state to the settings store (defaults to true in memory).
- Add a toggle button to the Control Island expanded menu with status-aware icons.
- Support translations for English, Simplified Chinese, and Japanese.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 introduces a new 'Always on Top' feature for the Tamagotchi application, allowing users to keep the application window visible above others. This enhancement improves user experience by providing quick access to the application, particularly useful for a desktop companion like a Tamagotchi. The implementation includes the necessary Electron IPC communication, persistent state management, and a user-friendly toggle button within the existing Control Island interface.

Highlights

  • Always on Top Window Management: Implemented a new IPC event for 'Always on Top' window management, allowing the application window to remain visible above others.
  • Settings Integration: Integrated an alwaysOnTop state into the application's settings store, defaulting to true in memory.
  • User Interface Toggle: Added a toggle button with status-aware pin icons to the Control Island's expanded menu for easy pinning and unpinning.
  • Localization Support: Prepared for multi-language support for the new feature, including English, Simplified Chinese, and Japanese.
Changelog
  • apps/stage-tamagotchi/src/main/services/electron/window.ts
    • Imported the new electronWindowSetAlwaysOnTop event.
    • Added an invoke handler to set the Electron window's alwaysOnTop property based on the received flag.
  • apps/stage-tamagotchi/src/renderer/components/stage-islands/controls-island/index.vue
    • Imported the electronWindowSetAlwaysOnTop event.
    • Destructured alwaysOnTop from the settings store.
    • Created an invoke function setAlwaysOnTop.
    • Added a watch effect to call setAlwaysOnTop when the alwaysOnTop state changes, applying it immediately on mount.
    • Implemented toggleAlwaysOnTop function to flip the state.
    • Added a new ControlButtonTooltip with conditional pin icons (bold for pinned, linear for unpinned) to the expanded menu.
  • apps/stage-tamagotchi/src/shared/eventa.ts
    • Defined a new electronWindowSetAlwaysOnTop invoke event for inter-process communication.
  • packages/stage-ui/src/stores/settings/controls-island.ts
    • Imported ref from vue.
    • Added a new alwaysOnTop ref initialized to true.
    • Included alwaysOnTop in the store's returned state and reset logic.
  • packages/stage-ui/src/stores/settings/index.ts
    • Exposed the alwaysOnTop property from the controlsIslandRefs.
Ignored Files
  • Ignored by pattern: packages/i18n/src/** (3)
    • packages/i18n/src/locales/en/tamagotchi/stage.yaml
    • packages/i18n/src/locales/ja/tamagotchi/stage.yaml
    • packages/i18n/src/locales/zh-Hans/tamagotchi/stage.yaml
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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.

Name Link
🔭 Waiting for approval For maintainers, approve here

Hey, @nekomeowww, @sumimakito, @luoling8192, @LemonNekoGH, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏

Copy link
Contributor

@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

This pull request introduces a new 'Always on Top' feature, complete with a toggle in the controls island. The implementation is solid, adding a new IPC event and integrating with the settings store. My main feedback is to consider persisting the 'always on top' setting using useLocalStorageManualReset for better user experience and consistency with other settings in the application. This would ensure the user's preference is saved across sessions.


function resetState() {
allowVisibleOnAllWorkspaces.reset()
alwaysOnTop.value = true
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

If alwaysOnTop is converted to use useLocalStorageManualReset as suggested in the comment for line 7, this line should be updated to call the reset method for consistency.

Suggested change
alwaysOnTop.value = true
alwaysOnTop.reset()

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@nekomeowww nekomeowww merged commit 604341a into moeru-ai:main Mar 9, 2026
4 of 9 checks passed
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.

3 participants