@@ -350,6 +350,14 @@ const HOME_COMPOSER_DESIGN_SYSTEM_SCOPE_KEY = 'open-design:home-composer:design-
350350// on remount (see `pendingChipRestore` below), the same way a cross-surface
351351// "use this plugin" hand-off resolves `pendingPluginUseHandoff`.
352352const HOME_COMPOSER_CHIP_KEY = 'open-design:home-composer:chip' ;
353+ // A user can remove Website clone's automatic URL scaffold without replacing
354+ // it. Remember that opt-out independently from the active type chip: switching
355+ // to another type rewrites HOME_COMPOSER_CHIP_KEY, but must not make the
356+ // scaffold eligible to reappear after a remount/reload. The marker is scoped to
357+ // the current composer draft and is cleared with the rest of that draft after a
358+ // successful run.
359+ const HOME_COMPOSER_WEB_CLONE_SEED_DISMISSED_KEY =
360+ 'open-design:home-composer:web-clone-seed-dismissed' ;
353361
354362interface HomeComposerChipDraft {
355363 chipId : string | null ;
@@ -448,6 +456,7 @@ function clearHomeComposerDraft(): void {
448456 writeHomeComposerDraft ( HOME_COMPOSER_PROMPT_KEY , null ) ;
449457 writeHomeComposerDraft ( HOME_COMPOSER_DESIGN_SYSTEM_KEY , null ) ;
450458 writeHomeComposerDraft ( HOME_COMPOSER_DESIGN_SYSTEM_SCOPE_KEY , null ) ;
459+ writeHomeComposerDraft ( HOME_COMPOSER_WEB_CLONE_SEED_DISMISSED_KEY , null ) ;
451460 writeHomeComposerChipDraft ( null ) ;
452461}
453462
@@ -656,6 +665,7 @@ export function HomeView({
656665 prompt : string ;
657666 designSystemId : string | null ;
658667 designSystemCatalogScope : LocalCatalogScope | null ;
668+ webClonePromptSeedDismissed : boolean ;
659669 } | null > ( null ) ;
660670 if ( restoredDraftRef . current === null ) {
661671 restoredDraftRef . current = {
@@ -664,6 +674,8 @@ export function HomeView({
664674 designSystemCatalogScope : readLocalCatalogScopeDraft (
665675 HOME_COMPOSER_DESIGN_SYSTEM_SCOPE_KEY ,
666676 ) ,
677+ webClonePromptSeedDismissed :
678+ readHomeComposerDraft ( HOME_COMPOSER_WEB_CLONE_SEED_DISMISSED_KEY ) === '1' ,
667679 } ;
668680 }
669681 const restoredDraft = restoredDraftRef . current ;
@@ -712,6 +724,9 @@ export function HomeView({
712724 const [ mcpServers , setMcpServers ] = useState < McpServerConfig [ ] > ( [ ] ) ;
713725 const [ mcpLoading , setMcpLoading ] = useState ( true ) ;
714726 const [ prompt , setPrompt ] = useState ( ( ) => restoredPrompt ) ;
727+ const webClonePromptSeedDismissedRef = useRef (
728+ restoredDraft . webClonePromptSeedDismissed ,
729+ ) ;
715730 // Treat a restored non-empty prompt as user-edited so the plugin/skill
716731 // replacement guard still asks before clobbering it. The Website-clone
717732 // scaffold is mode UI, not a user draft; the exact-text fallback migrates
@@ -2081,6 +2096,19 @@ export function HomeView({
20812096 }
20822097
20832098 function handlePromptChange ( nextPrompt : string ) {
2099+ // This handler only runs for real editor changes. If the user empties a
2100+ // Website-clone draft, treat that as an explicit dismissal of the automatic
2101+ // URL scaffold and persist it across tab switches, remounts, and reloads.
2102+ // Programmatic cleanup uses setPrompt directly and therefore cannot set the
2103+ // dismissal marker accidentally.
2104+ if (
2105+ active ?. chipId === 'web-clone'
2106+ && prompt . trim ( ) . length > 0
2107+ && nextPrompt . trim ( ) . length === 0
2108+ ) {
2109+ webClonePromptSeedDismissedRef . current = true ;
2110+ writeHomeComposerDraft ( HOME_COMPOSER_WEB_CLONE_SEED_DISMISSED_KEY , '1' ) ;
2111+ }
20842112 setPrompt ( nextPrompt ) ;
20852113 setPromptEditedByUser ( true ) ;
20862114 if ( active ?. promptSeedKind ) {
@@ -2566,7 +2594,9 @@ export function HomeView({
25662594 // gets the localized "clone this site: <url>" scaffold instead of
25672595 // staying blank. A non-empty draft is the user's — leave it alone.
25682596 const promptSeed =
2569- chip . id === 'web-clone' && prompt . trim ( ) . length === 0
2597+ chip . id === 'web-clone'
2598+ && prompt . trim ( ) . length === 0
2599+ && ! webClonePromptSeedDismissedRef . current
25702600 ? t ( 'homeHero.chip.webClonePromptSeed' )
25712601 : null ;
25722602 if ( chip . group === 'create' ) {
0 commit comments