SIGN IN SIGN UP
appsmithorg / appsmith UNCLAIMED

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.

0 0 68 TypeScript

feat(client): docs link tooltip on Appsmith Base URL setting + trailing-slash normalization (#41782)

## Summary

Two related changes to the `APPSMITH_BASE_URL` setting under **Settings
→ Configuration**:

1. **Docs link tooltip** — adds an optional `helpTextLink` field to the
admin `Setting` type and extends the shared `FormGroup` so the (?) icon
next to the label renders the help text plus a `<Link
target="_blank">Learn more</Link>` to docs (when both `helpText` and
`helpTextLink` are set). Wires this onto `APPSMITH_BASE_URL` pointing at
`https://docs.appsmith.com/getting-started/setup/environment-variables#appsmith_base_url`.
Mirrors the existing tooltip-with-link pattern already used by
`RadioField`'s embed-settings option, so the convention stays consistent
across setting types. Pure additive — when `helpTextLink` is absent,
behavior is unchanged.

2. **Server-side trailing-slash normalization** — operators frequently
configure `APPSMITH_BASE_URL` with a trailing slash (e.g.
`https://app.example.com/`). The resolver previously returned the
configured value verbatim, so downstream `"%s/path"` formatting in email
templates produced `"https://host//path"` — a doubled slash that
React-Router on the SPA does not collapse, breaking password-reset,
email-verification, and invite links on standard Caddy-only deployments.
Add a one-shot `@PostConstruct` hook on `SecureBaseUrlResolverCEImpl`
that strips trailing slash(es) from the configured value once at bean
init. `sameOrigin` was already RFC 6454-tolerant, so the security check
is unaffected — only the returned/persisted value changes.

## Why two pieces in one PR

They are both follow-ups to the GHSA-j9gf-vw2f-9hrw fail-closed work
that just landed (PR #41767). The tooltip surfaces docs at the point of
configuration; the normalization closes the foot-gun the docs would
otherwise warn against. Together they make the setting genuinely safe to
use without requiring a docs round-trip.

Originally drafted as EE-only PR
<https://github.com/appsmithorg/appsmith-ee/pull/9036> before realizing
every file is CE-side or shared. This CE PR is the byte-for-byte
equivalent; the EE PR will be closed once this lands and the hourly sync
carries it across.

## Test plan

- [x] `mvn ... SecureBaseUrlResolverCEImplTest test` — **20/20 pass**
(18 existing + 2 new normalization-pinning cases). `newResolver()` test
helper updated to invoke `init()` after the reflection-injected fields,
mirroring the runtime Spring lifecycle.
- [x] `app/server/build.sh -DskipTests -T 8` — BUILD SUCCESS
- [x] `common.test.tsx` — 2 new cases: `helpTextLink` absent → no link
rendered; `helpTextLink` set → link with correct `href`,
`target="_blank"`, and "Learn more" text
- [x] `yarn check-types` — green
- [x] `yarn lint-staged` (eslint --fix --cache + gitleaks) — green

## Linear

Resolves
[APP-15205](https://linear.app/appsmith/issue/APP-15205/task-add-docs-link-in-the-appsmith-base-url-env-var-settings-page).

## Automation
/ok-to-test tags="@tag.Sanity"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/25478869120>
> Commit: 012149f56ca4fe50e1da1b8860826ba481731392
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=25478869120&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 07 May 2026 06:47:53 UTC
<!-- end of auto-generated comment: Cypress test results  -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added a contextual "Learn More" link in Admin Settings for the
Appsmith Base URL help text.
* Base URL setting now normalizes trailing slashes to prevent URL/path
formatting issues.

* **Tests**
* Expanded tests for Base URL normalization and conditional rendering of
the help-text "Learn More" link.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
S
subratadeypappu committed
c268bcecd87ea22d606b35d2297c0603cc7218f0
Parent: 287f1cd
Committed by GitHub <noreply@github.com> on 5/7/2026, 11:06:51 AM