Repository navigation
Add page feedback collection - #3705
Conversation
|
+CC @technige A good candidate for the "Other" slide :) |
Mpdreamz
left a comment
There was a problem hiding this comment.
Good first pass — the feature shape is right. Four concrete follow-ups below.
Pre-existing note (ElasticsearchAskAiMessageFeedbackGateway.cs:71): record.Reaction.ToString().ToLowerInvariant() bypasses whatever [JsonStringEnumMemberName] attributes the reaction enum declares. Worth fixing alongside the PageFeedbackDocument change.
|
does this feedback get exposed to writers? |
That's the goal |
Mpdreamz
left a comment
There was a problem hiding this comment.
Should we introduce rate limiting to the API at this point?
Should we add cloudflare turnstile?
We have a general rate limit in WAF. But it's definitely worth double-checking in docs-infra. |
|
Before rolling this out in Prod, we should follow-up with a task to define the feedback options as a team. |
SGTM. But I definitely want to get this into staging to verify it functionally. |
|
@copilot resolve the merge conflicts in this pull request |
Resolved in |
There is still a conflict |
Fixed in |
|
What's the status of this one? |
f9ff34e to
360fc52
Compare
Rebase updateRebased onto current API layouts still render Review follow-upsInline threads from the earlier pass (enums, Rate limiting / Turnstile (
|
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3705/ Sample changed pages: |
Capture per-page reactions and optional comments so documentation teams can identify content gaps and prioritize improvements. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> Co-authored-by: Cursor <[email protected]>
Keep failed comments visible so users can retry from the existing form without a detached recovery action. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> Co-authored-by: Cursor <[email protected]>
Remove retry-specific indirection now that failed comments remain in the existing form. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> Co-authored-by: Cursor <[email protected]>
Capture reactions promptly while collecting queryable reasons and optional details in a changeable, retry-safe flow. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> Co-authored-by: Cursor <[email protected]>
Use direct channel writes and assembly mapping versions so API responses reflect item persistence and rolling deployments cannot downgrade templates. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> Co-authored-by: Cursor <[email protected]>
…dreamz) Consolidate endpoint transport creation in configuration so API feedback adapters reuse one connection pool and tooling no longer maintains duplicate factories. Co-authored-by: Cursor <[email protected]>
Use the enum wire-name attributes as the single source of truth so stored values cannot drift from the API contract. Co-authored-by: Cursor <[email protected]>
Keep the feedback prompt visually separated from both page content and navigation. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]> Co-authored-by: Cursor <[email protected]>
Rebase had deleted essc's ElasticsearchEndpoint/TransportFactory while pulling Configuration into essc callers. Restore main's essc surface and apply curb format so CI lint passes. Co-Authored-By: Composer <[email protected]> Co-authored-by: Cursor <[email protected]>
…-advanced-security) Strip CR/LF from user-controlled PageUrl so log entries cannot be forged. Co-Authored-By: Composer <[email protected]> Co-authored-by: Cursor <[email protected]>
API and Codex layouts now share the build feature flags so air-gapped gating works. Submit sends one complete payload instead of a silent retry plus a flushed debounce write. Co-Authored-By: Composer <[email protected]> Co-authored-by: Cursor <[email protected]>
Readers often write a different note for each option. A same-tab refresh should not drop that draft, and API pages need copy that talks about the spec. Co-Authored-By: Cursor Grok 4.6 <[email protected]> Co-authored-by: Cursor <[email protected]>
4656e4c to
7b96e6c
Compare
Switching used to wipe every draft. Readers lose typed text if they change their mind. Co-Authored-By: Cursor Grok 4.6 <[email protected]> Co-authored-by: Cursor <[email protected]>
Readers can leave thumbs and short comments on docs and API pages without leaving the page. Teams get page-level signals in Elasticsearch instead of scattered GitHub issues.
Affects: docs site (Markdown + API reference), docs API
Prompt summary: Finish the page-feedback PR and use it for API feedback instead of wiring a GitHub
api-feedbackissue template (https://github.com/elastic/docs-eng-team/issues/819).Why
API and Markdown pages lack a shared on-page way to capture whether content helped. The old Bump Feedback path opened a GitHub form; Search/Ask AI used the wrong template. Teams need structured reactions they can query without sending readers off-site.
Closes elastic/docs-eng-team#819
What
Page feedback control
Assembler and Codex pages render a
page-feedbackweb component under the article. Users pick thumbs up or down, optional reasons, and a comment. They can revise or revoke within the session. The control stays off when air-gapped or whenPAGE_FEEDBACKis disabled.API and storage
New PUT/DELETE
/page-feedback/{id}endpoints upsert and delete documents through Elastic Ingest (DirectWriteAsync). Mapping bootstrap is version-aware. Staging, preview, anddevenable the flag inassembler.yml.API reference pages
API layouts include the same
_PageFeedbackpartial as Markdown, so API chrome collects real feedback rather than linking to a GitHub issue template.Verify
Enable
PAGE_FEEDBACKlocally or use staging/preview with API explorer. Confirm an API page shows the feedback control and a successful reaction does not open GitHub.Out of scope: App-level rate limiting and Cloudflare Turnstile. Staging relies on existing WAF limits; revisit before production rollout.
Risk: Writes feedback documents into an environment-specific Elasticsearch index. A code revert does not delete already-written documents.