feat: add scroll feature & change profile ui & other#5
Conversation
There was a problem hiding this comment.
💡 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".
| const updated = profiles.map((p) => p.id === profileId ? { ...p, autoStart: true } : p); | ||
| deps.profileStore.saveProfiles(updated); |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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) => { |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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 👍 / 👎.
No description provided.