Skip to content

Conversation

@thalesac
Copy link

@thalesac thalesac commented Jun 11, 2025

Allow users to set a custom profile name, which can improve the identification of user sessions and preferences. E.g.
Work profile for client X, Personal, etc.

  • Introduced getDisplayProfileName to retrieve the profile name in the heartbeat function.
  • Added a new input field for custom profile name in the settings interface.
  • Implemented generateProfileIdentifier

Important

Adds custom profile name functionality to heartbeat and settings, including UI input and storage handling.

  • Behavior:
    • Adds profileName to heartbeat data in heartbeat.ts using getDisplayProfileName().
    • Initializes profile identifier in main.ts with generateProfileIdentifier().
  • Settings UI:
    • Adds input field for profileName in index.html.
    • Handles saving and restoring profileName in main.ts.
  • Storage:
    • Implements getCustomProfileName, setCustomProfileName, and getDisplayProfileName in storage.ts.
    • Adds generateProfileIdentifier to create unique profile identifiers.
  • Misc:
    • Adds a custom Vite plugin in vite.config.ts to copy logo files during build.

This description was created by Ellipsis for 116d29b. You can customize this summary. It will automatically update as commits are pushed.

This change enhances user experience by allowing users to set a custom profile name, which can improve the identification of user sessions and preferences. Without this change, users would lack a personalized touch in their interactions, potentially leading to confusion when managing multiple profiles.

* Introduced `getDisplayProfileName` to retrieve the profile name in the heartbeat function.
* Added a new input field for custom profile name in the settings interface.
* Implemented `generateProfileIdentifier`

Signed-off-by: Thales Ceolin <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 116d29b in 55 seconds. Click for details.
  • Reviewed 220 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/background/heartbeat.ts:31
  • Draft comment:
    Including profileName in heartbeat data is a useful addition for session tracking. Ensure getDisplayProfileName returns an appropriate fallback when no custom name is set.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. src/background/main.ts:38
  • Draft comment:
    initializeProfileIdentifier is straightforward. Consider adding error handling around generateProfileIdentifier to catch potential failures.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. src/settings/index.html:54
  • Draft comment:
    The Profile Name input field is clearly implemented. Consider adding a maxlength attribute to limit input length and mitigate potential abuse.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. src/settings/main.ts:39
  • Draft comment:
    Custom profile name handling on save works well. It might be beneficial to add client-side validation (e.g., maximum length) beyond the HTML pattern.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. src/storage.ts:140
  • Draft comment:
    getDisplayProfileName provides a sensible fallback using a truncated profile identifier when no custom name is set. Verify that this fallback meets the display requirements.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. vite.config.ts:32
  • Draft comment:
    The custom plugin for copying the logo is a neat addition. Consider whether a missing logo file should trigger an error if it's critical for branding.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_RR8zl8nGDXoZDmb7

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

Choose a reason for hiding this comment

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

Was there some problem with the current implementation? Vite should automatically copy all files to the bundled extension :)

Copy link
Author

Choose a reason for hiding this comment

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

will remove that part, something happened and it didnt copy on my end.
other than that is there anything else you want to modify?
thanks for reviewing so quickly

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll take a closer look in the evening, it looks fine for now 😇

Copy link
Author

@thalesac thalesac Jun 11, 2025

Choose a reason for hiding this comment

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

excellent. I've just removed the unecessary copy.
thanks again @BelKed

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems that there is still missing a trailing space, please remove :)

The removal of the custom plugin for copying the logo file streamlines the Vite configuration, reducing unnecessary complexity. Without this change, the build process could have included redundant steps that may lead to confusion or errors in future maintenance.

* Eliminated the custom plugin that copied the logo file from the media directory to the build directory.
* Removed imports for file system operations and path resolution that were no longer necessary.

Signed-off-by: Thales Ceolin <[email protected]>
Copy link
Contributor

@BelKed BelKed left a comment

Choose a reason for hiding this comment

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

Hi, sorry, got a little busy in the last couple of days...

I've manually tested the change, it seems to work fine :)

I have just one request — please display the profile name in the extension popup, under Hostname

This change enhances the user experience by providing visibility into the user's profile directly within the popup. Without this addition, users would lack important contextual information, potentially leading to confusion regarding their current profile status.

* Introduced a new table row in the HTML to display the user's profile.
* Integrated the `getDisplayProfileName` function to fetch the profile name from storage.
* Updated the `renderStatus` function to populate the profile name in the newly added HTML element.

Signed-off-by: Thales Ceolin <[email protected]>
@thalesac
Copy link
Author

thalesac commented Jun 20, 2025

@BelKed just updated with your request. THanks for looking into it!

image

@thalesac
Copy link
Author

friendly bump in case this is forgotten @BelKed

@BelKed
Copy link
Contributor

BelKed commented Jul 15, 2025

I'm not a repo owner/maintainer, @ErikBjare is 😁

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