Skip to content

feat: add scroll feature & change profile ui & other#5

Merged
little-bb merged 7 commits into
mainfrom
feat/scroll
Mar 17, 2026
Merged

feat: add scroll feature & change profile ui & other#5
little-bb merged 7 commits into
mainfrom
feat/scroll

Conversation

@little-bb

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa984d4a4a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +92 to +93
const updated = profiles.map((p) => p.id === profileId ? { ...p, autoStart: true } : p);
deps.profileStore.saveProfiles(updated);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Sync profile state after persisting autoStart

Persisting autoStart here introduces a state divergence: the renderer's startProfile/stopProfile paths only refresh statuses and do not reload profiles, so the in-memory profile list can keep stale autoStart values. If the user then performs any operation that calls saveProfiles from that stale list (for example add/edit/delete a profile), the just-persisted autoStart flag is overwritten and the start/stop preference is silently lost for next app launch.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8b030ad09

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

setStatuses(payload.statuses);
});

const unsubProfilesChanged = api.onProfilesChanged((payload) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard new profile-change subscription before calling it

useProxyEvents now unconditionally calls api.onProfilesChanged, but getElectronAPI() still only validates the older method set (src/renderer/src/lib/electron-api.ts, requiredMethods) and does not assert this new bridge exists. In any runtime with a partial/stale bridge (e.g. older preload bundle or existing test/mocked environments), this line throws TypeError: api.onProfilesChanged is not a function, which prevents all subsequent proxy-event subscriptions from being registered.

Useful? React with 👍 / 👎.

@little-bb little-bb merged commit 0c919f2 into main Mar 17, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b7b646085

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

<div className="space-y-1">
{profiles.map((profile) => {
const isRunning = statuses[profile.id]?.isRunning ?? false;
const [rowHovered, setRowHovered] = useState(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Move hover state hook out of profile map loop

Calling useState inside profiles.map violates the Rules of Hooks and makes the hook count depend on how many profiles are rendered. As soon as the list length changes (for example after adding or deleting a profile in this dialog), React can throw a hook-order runtime error (Rendered more/fewer hooks than expected) and break the Settings view instead of updating the list.

Useful? React with 👍 / 👎.

@little-bb little-bb deleted the feat/scroll branch March 18, 2026 02:42
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