feat(web): add customizable input placeholder for Agent/Chatflow/Chatbot web app#37790
Draft
CyberPU2099 wants to merge 3 commits into
Draft
feat(web): add customizable input placeholder for Agent/Chatflow/Chatbot web app#37790CyberPU2099 wants to merge 3 commits into
CyberPU2099 wants to merge 3 commits into
Conversation
Add an "Input placeholder" field to Web App Settings that lets owners
customize the chat input box placeholder text. Available only for chat-style
apps (Chatbot / Agent / Chatflow) and gated behind the same paid-plan
entitlement (`webappCopyrightEnabled`) as Copyright.
Free plan shows an Upgrade pill + read-only field; paid plan can edit up to
64 chars with a live counter. At runtime the value flows into both the
standalone Web App and the embedded chatbot; empty / whitespace-only falls
back to the existing `Talk to {{botName}}` i18n string.
i18n: en-US, zh-Hans, ja-JP.
Requires backend support to persist the new `input_placeholder` column on
the `sites` table and surface it on the site GET/PATCH endpoints — see PR
description for details. Without the backend counterpart the UI renders
correctly but the value is silently dropped on save.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #37790 +/- ##
==========================================
- Coverage 85.79% 85.79% -0.01%
==========================================
Files 5001 5001
Lines 255153 255181 +28
Branches 48288 48307 +19
==========================================
+ Hits 218911 218932 +21
- Misses 32048 32055 +7
Partials 4194 4194
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Adds an Input placeholder field to Web App Settings that lets owners customize the chat input box placeholder text. Available only for chat-style apps (Chatbot / Agent / Chatflow) and gated behind the same paid-plan entitlement (
webappCopyrightEnabled) as Copyright.N / 64counter; the field renders as a mini chat input box (text + disabled send button) and on blur swaps the entered value to placeholder-gray so owners see the actual rendered effectTalk to {{botName}}i18n stringScope
Frontend only (
web/). No new dependencies. 8 files, +106/-2.web/types/app.tsSiteConfig.input_placeholder: stringweb/models/share.tsSiteInfo.input_placeholder?: stringweb/i18n/{en-US,zh-Hans,ja-JP}/app-overview.jsonweb/app/components/app/overview/settings/index.tsxweb/app/components/base/chat/chat/index.tsxcustomPlaceholderto ChatInputAreaweb/app/components/base/chat/chat/chat-input-area/index.tsxcustomPlaceholderprop and prefer it over the default i18n string when not readonlyThis PR ships the frontend only. End-to-end functionality requires a backend counterpart:
input_placeholder VARCHAR(64) NOT NULL DEFAULT ''to thesitestable.input_placeholderin the serializedsitepayload so the frontend can read what was saved.len <= 64, persist.webapp_copyright_enabled(current frontend gate) or add a dedicatedwebapp_input_placeholder_enabledflag. If the backend splits the gate, swap a single constant insettings/index.tsx.Without these, the field renders correctly in Settings but the value is silently dropped on save (backend ignores the unknown field, GET returns no value, runtime falls back to default).
Test plan
N / 64counter,maxLengthenforced; focus → text in primary color, blur with value → text switches to placeholder-gray (live preview)Talk to {botName}chat.inputDisabledPlaceholderrather than the custom stringRelated
🤖 Generated with Claude Code