feat/simplify-forge-form-messaging#12266
Merged
PavelLaptev merged 4 commits intomasterfrom Feb 7, 2026
Merged
Conversation
Refactor ForgeForm UI to remove InfoMessage components and adjust titles
and call-to-action for missing GitLab/GitHub accounts. Replace the verbose
warning blocks with inline conditional titles ("No GitLab accounts found"
/"No GitHub accounts found") and a unified "Set up in General Settings"
button that uses an icon and concise label. Remove the dedicated
open-settings container CSS and streamline markup by deleting
InfoMessage wrappers and related styles.
This makes the form copy more compact and consistent across forges,
reduces duplicated markup, and emphasizes a single actionable path to
open integrations settings.
- Replace duplicate forgeOptions with a single FORGE_OPTIONS const to avoid repetition and centralize available forge choices (None, GitHub, GitLab, Azure, BitBucket). - Add AccountIdentifier union type and getAccountUsername helper for consistent access to account usernames across providers. - Simplify Select onselect handler to call handleSelectionChange directly. - Extract repeated provider account configuration markup into a reusable forgeAccountConfig render invocation for GitLab (and begin same pattern for GitHub). This removes duplicated CardGroup.Item blocks and their internal select/item rendering logic. - Pass provider-specific utilities (account lists, conversion functions, badge component, docs URL and request type) into the reusable renderer so provider UI remains customizable. Motivation: reduce duplication, improve readability and maintainability, and make it easier to add or update forge provider UI in one place.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Desktop app’s ForgeForm UI by consolidating provider-specific account configuration into a reusable renderer and tightening the “missing accounts” messaging/CTA to a single General Settings action.
Changes:
- Replaced provider-specific
InfoMessageblocks with a sharedforgeAccountConfigrenderer and inline titles/CTA. - Centralized forge select options into a
FORGE_OPTIONSconstant and simplified the selectonselecthandler. - Introduced a shared
AccountIdentifierunion +getAccountUsernamehelper for consistent username rendering.
Update ForgeForm.svelte to show a clear call-to-action when no
accounts or no preferred account are present. Replace the passive
"No {displayName} accounts found" with "Connect your {displayName}
account" so users see an explicit next step instead of a status-only
message.
This improves onboarding clarity and encourages users to complete
account setup for integrations.
Introduce a new ForgeAccountConfig component to let users view and
select a preferred Forge account for a project. The component:
- accepts typed props for accounts, conversion helpers, badge component,
request type and docs URL.
- shows contextual title/caption depending on whether any accounts are
connected.
- opens General Settings when no accounts exist.
- renders a Select with custom items showing username and AccountBadge,
and updates the preferred account on change.
Refactor UnassignedViewForgePrompt to simplify integration flow:
- remove project-specific settings branch and the unused AvailableForge
type import.
- always open General Settings('integrations') for configuration,
removing openProjectSettings usage and the forge-specific switch.
- adjust button handler to call the simpler configureIntegration.
Minor wiring:
- import ForgeAccountConfig in ForgeForm.
- remove now-unused useSettingsModal import from ForgeForm.
- small adjustments to imports and typing.
These changes streamline account configuration, consolidate
settings navigation, and add a reusable UI for selecting a Forge
account per project.
faa4fbf to
7c52d36
Compare
Contributor
Author
|
cc @estib-vega |
| }: Props = $props(); | ||
|
|
||
| const { openGeneralSettings } = useSettingsModal(); | ||
| const hasAccounts = $derived(accounts.length > 0 && preferredAccount); |
There was a problem hiding this comment.
hasAccounts is derived from accounts.length > 0 && preferredAccount, which makes its type/value TAccount | false | undefined rather than a boolean. This works in {#if} but is harder to reason about and can confuse TS narrowing; consider deriving a boolean explicitly (e.g., accounts.length > 0 && preferredAccount !== undefined).
Suggested change
| const hasAccounts = $derived(accounts.length > 0 && preferredAccount); | |
| const hasAccounts = $derived(accounts.length > 0 && preferredAccount !== undefined); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before:

After:

Figma link https://www.figma.com/design/ShIiR6hI5dzH7sT5L03Jg1/App-Design-3.5?node-id=11100-42752&t=fHeg6ha2kFbpcFI1-1
Summary
What changed
Why
Notes for reviewers