Skip to content

docs: correct how the SSE push transport fails when disabled - #6766

Merged
peholmst merged 2 commits into
mainfrom
doc-bot/vaadin-flow/27195-26420716ca78f538
Dec 2, 2026
Merged

peholmst merged 2 commits into
mainfrom
doc-bot/vaadin-flow/27195-26420716ca78f538

Conversation

@vaadin-bot

Copy link
Copy Markdown
Contributor

Documentation for vaadin/flow#27195 by @totally-not-ai[bot].

Note

The source pull request is merged, so this documentation describes the final
shape of the change. Please review it and mark it ready for review.

Change categories: BEHAVIOR_CHANGE

File Change
articles/flow/advanced/server-push.adoc The Server-Sent Events section said that selecting the experimental transport while its feature flag is disabled throws a DisabledFeatureException. That's still true for PushConfiguration.setTransport(), but a @Push(transport = Transport.SERVER_SENT_EVENTS) annotation on the application shell or a web component exporter now fails application startup instead, since the annotation is read before any UI exists. The paragraph now distinguishes the two cases, right above the code example it corrects.

Auto-generated by the Documentation Bot — review before merging.

Generated by Documentation Bot for #27195 · agent · 81.2 AIC · ⊞ 11.7K · ◷

  • expires on Dec 24, 2026, 5:35 PM UTC

Distinguish the startup failure for @Push(transport = SERVER_SENT_EVENTS)
on the application shell or a web component exporter from the
DisabledFeatureException thrown by PushConfiguration.setTransport(), on
the Server Push reference page.

Documents vaadin/flow#27195 (`9614500cd03b24724b2ca9bdd7a273d91f063436`).
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6766.fly.dev

Changed pages

Added content is highlighted in green; removed content is marked in red on each page.

Built from ef5e555

@peholmst
peholmst marked this pull request as ready for review December 2, 2026 07:44

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes — left 3 comments.

Finding
⚠️ The startup error doesn't name the class for a web component exporter
💬 The exception thrown at startup isn't named
📐 The first sentence is 41 words with an aside that splits subject from verb

Comment thread articles/flow/advanced/server-push.adoc Outdated
This transport is experimental and requires enabling the `ssePushTransport` feature flag; see <<{articles}/flow/configuration/feature-flags#,Feature Flags>>. Selecting it while the feature flag is disabled throws a `DisabledFeatureException`.
This transport is experimental and requires enabling the `ssePushTransport` feature flag; see <<{articles}/flow/configuration/feature-flags#,Feature Flags>>.

Selecting it in a `@Push` annotation -- on the application shell, or on a <<{articles}/flow/integrations/embedding/push#,web component exporter>> -- while the feature flag is disabled prevents the application from starting, with an error that names the annotated class and how to enable the flag. Selecting it by calling [methodname]`PushConfiguration.setTransport()` while the feature flag is disabled throws a `DisabledFeatureException` instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ The startup error doesn't name the class for a web component exporter

The new sentence says the startup error "names the annotated class" for both locations, but for an exporter the message only says a web component exporter.

WebComponentConfigurationRegistryInitializer.java:93-94 passes the literal string "a web component exporter" as the owner, while VaadinAppShellInitializer.java:164-165 passes "the app shell " + shell.getName(). The test at WebComponentConfigurationRegistryInitializerTest.java:168 asserts only on "web component exporter".

Suggested fix: drop the claim about the class name, for example "…prevents the application from starting, with an error that says where the annotation is and how to enable the flag."

server-push.adoc:121 · accuracy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The claim about the class name is gone. The text now says the message says where the annotation is and how to enable the flag.

Comment thread articles/flow/advanced/server-push.adoc Outdated
This transport is experimental and requires enabling the `ssePushTransport` feature flag; see <<{articles}/flow/configuration/feature-flags#,Feature Flags>>. Selecting it while the feature flag is disabled throws a `DisabledFeatureException`.
This transport is experimental and requires enabling the `ssePushTransport` feature flag; see <<{articles}/flow/configuration/feature-flags#,Feature Flags>>.

Selecting it in a `@Push` annotation -- on the application shell, or on a <<{articles}/flow/integrations/embedding/push#,web component exporter>> -- while the feature flag is disabled prevents the application from starting, with an error that names the annotated class and how to enable the flag. Selecting it by calling [methodname]`PushConfiguration.setTransport()` while the feature flag is disabled throws a `DisabledFeatureException` instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 The exception thrown at startup isn't named

The paragraph names DisabledFeatureException for the PushConfiguration path but describes the annotation path only as "prevents the application from starting, with an error". The exception is [classname]InvalidApplicationConfigurationException (PushUtil.java:86).

A developer whose application fails to start searches the stack trace's exception name in the docs and finds nothing on the page that covers exactly this case. Naming it costs two words:

…prevents the application from starting with an [classname]InvalidApplicationConfigurationException, whose message says…

server-push.adoc:121 · clarity

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The paragraph now names InvalidApplicationConfigurationException as the exception that stops the application from starting.

Comment thread articles/flow/advanced/server-push.adoc Outdated
This transport is experimental and requires enabling the `ssePushTransport` feature flag; see <<{articles}/flow/configuration/feature-flags#,Feature Flags>>. Selecting it while the feature flag is disabled throws a `DisabledFeatureException`.
This transport is experimental and requires enabling the `ssePushTransport` feature flag; see <<{articles}/flow/configuration/feature-flags#,Feature Flags>>.

Selecting it in a `@Push` annotation -- on the application shell, or on a <<{articles}/flow/integrations/embedding/push#,web component exporter>> -- while the feature flag is disabled prevents the application from starting, with an error that names the annotated class and how to enable the flag. Selecting it by calling [methodname]`PushConfiguration.setTransport()` while the feature flag is disabled throws a `DisabledFeatureException` instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 The first sentence is 41 words with an aside that splits subject from verb

CONVENTIONS.md: "When a sentence that you add or change is too long, split it. Give an aside or an example its own sentence." Vale's threshold is 30 words; this sentence has about 41, and the -- aside puts 13 words between "Selecting it in a @Push annotation" and the verb "prevents".

Suggested split:

A @Push annotation can select this transport on the application shell, or on a <<{articles}/flow/integrations/embedding/push#,web component exporter>>. While the feature flag is disabled, either one prevents the application from starting.

server-push.adoc:121 · conventions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split as suggested. One sentence says where @Push can select the transport. The next says what happens while the flag is disabled, and a third covers the message.

The startup error names the class only for the app shell; for a web
component exporter it just says "a web component exporter". Name the
InvalidApplicationConfigurationException it throws.
@peholmst
peholmst merged commit 4d889c8 into main Dec 2, 2026
10 of 11 checks passed
@peholmst
peholmst deleted the doc-bot/vaadin-flow/27195-26420716ca78f538 branch December 2, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants