Skip to content

feat: introduce feedback feature - #728

Merged
pikann merged 5 commits into
masterfrom
feature/introduce-feedback-feature
Nov 12, 2026
Merged

pikann merged 5 commits into
masterfrom
feature/introduce-feedback-feature

Conversation

@pikann

@pikann pikann commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Makes it easier for users to open a GitHub issue from inside the app, and upgrades the issue templates from a single description field to structured, multi-field forms.

  • Send feedback: new item in the user menu that opens GitHub's issue chooser (/issues/new/choose) in a new tab, where the user picks "Bug report" or "Feature request".
  • Report this issue: new button on the route error screen. It opens the bug-report form pre-filled with the full error: message, stack, failed request URL/method, HTTP status, response body, plus the page path and browser info (no query string or hash). It is hidden for permission (403) errors, since there is nothing to report. It opens GitHub directly rather than via a dialog, so it also works if the root route itself crashed.
  • Issue templates: bug_report.md and feature_request.md are replaced by issue forms (.yml) with separate required/optional fields.
    • Bug report: summary, area, steps to reproduce, expected, actual, environment, error details/logs, additional context.
    • Feature request: summary, problem, proposed solution, alternatives considered, area, additional context.
    • New config.yml points security reports to the private advisory page.
  • Very long errors are truncated (with a visible marker) so the pre-filled URL stays under ~7,000 characters and still opens.

The form field ids in .github/ISSUE_TEMPLATE/*.yml must match the keys in apps/web/src/lib/feedback.ts, otherwise the pre-fill silently stops working.

Type of Change

  • Other (new user-facing feature, issue templates)

Testing

  • Unit tests: lib/feedback.test.ts (URL building, truncation, error formatting) and route-error-boundary.test.tsx (button opens the pre-filled issue, hidden for 403). Full web suite passes (157 files, 1,636 tests); tsc -b and biome are clean.
  • E2E: new apps/e2e/tests/ui/feedback.spec.ts (+ features/ui/feedback.feature) covering the menu item, the pre-filled bug report from a forced load error, and the hidden button on a 403. Passes on chromium and mobile-chrome. GitHub is stubbed, never contacted.
  • Not verified against real GitHub: pre-fill behaviour of the new issue forms has not been exercised on github.com.

Notes

  • Translations: only userMenu.sendFeedback and common.reportIssue were added, in all nine locales. The eight non-English strings were machine-written and could use a native-speaker skim.
  • Only the route error screen has the report button for now; the smaller inline error states (e.g. admin users/roles lists) do not.

Checklist

  • The change is focused and scoped.
  • Related documentation is updated.
  • New structure or direction is explained clearly.
  • I avoided unnecessary detail or premature abstraction.

@pullfrog pullfrog Bot left a comment

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.

ℹ️ No critical issues — a few small refinements inline.

Reviewed changes

The full 30-file diff was read end-to-end, plus the touched route/loader, i18n config, and repo test conventions.

  • Send feedback menu item — UserMenu gains an item that opens GitHub's issue chooser in a new tab, leaving the app in place.
  • Report this issue on route errors — RouteErrorComponent renders a second button that opens the bug-report form pre-filled from the caught error, and hides it for 403s.
  • Issue forms — bug_report.md / feature_request.md are replaced by bug_report.yml / feature_request.yml forms with per-field ids, plus a config.yml security contact link.
  • lib/feedback.ts — URL builder with iterative truncation, error formatting, non-identifying environment collection, and draft helpers, with unit tests.
  • E2E coverage — feedback.feature / feedback.spec.ts, stubbing github.com and forcing 400/403 on /api/v1/agents/llm-models.
  • i18n — userMenu.sendFeedback and common.reportIssue added to all nine locales.

ℹ️ The prefill URL shape matches GitHub's documented contract

The PR body flags real-GitHub prefill as unverified, so worth recording what the docs actually promise: a form field's id is the canonical key for query-parameter prefills, and form-field params may also be passed to the template chooser. The ids used here (summary, area, environment, logs) therefore line up with the new YAML forms.

Technical details
# GitHub issue-form prefill contract

## Sources
- https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys
  — `id`: "the canonical identifier for the field in URL query parameter prefills".
- https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue#creating-an-issue-from-a-url-query
  — "You can also use URL query parameters to fill custom text fields ... Query parameters for issue form fields can also be passed to the issue template chooser."

## Caveat
- The docs explicitly name text fields; the `area` dropdown prefill relies on the
  generic `id` wording, so it is the one field still worth a manual click on
  github.com.

## Affected sites
- `apps/web/src/lib/feedback.ts:16` — `TEMPLATE_BY_KIND`.
- `apps/web/src/lib/feedback.ts:176` — field ids produced by `draftFromError`.
- `.github/ISSUE_TEMPLATE/bug_report.yml:12-68` — matching `id`s.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread apps/e2e/tests/ui/feedback.spec.ts Resolved
Comment thread apps/web/src/lib/feedback.ts Resolved
Comment thread .github/ISSUE_TEMPLATE/bug_report.yml Resolved

@pullfrog pullfrog Bot left a comment

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.

ℹ️ No new issues found in the changes since the last review.

Reviewed changes

Reviewed the delta from 431ea1e to c9e1445 (17 files): the extracted report action plus its integration across inline error states. No behavioral regressions or missing wiring found; the web check/test/build check succeeded on this head.

  • Extracted ReportIssueButton — moved the in-page report action into components/report-issue-button.tsx, preserving the 403 suppression and the pre-filled bug-report draft.
  • Reused it in the route error screen — RouteErrorComponent now renders the shared button beside Retry instead of duplicating the markup.
  • Added it to inline error states — admin users, global roles, service accounts, login security, SSO settings, admin changelog, and home assigned tasks now offer the button with their query's error; the users/roles state components gained an optional error prop.
  • Extended it to not-found screens — project, sprint, and document error screens pass their query error through, leaving the 403 branch unchanged.
  • Added coverage — a component test for the URL and the 403 case, plus an e2e scenario forcing /api/v1/admin/users to 400 and asserting the inline error's pre-filled bug_report.yml URL.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Reviewed changes

Reviewed the delta from c9e1445 to e29b52a (4 files). All three threads from the initial review are addressed, and I did not find any new problems in the changes.

  • Corrected the issue-form tips — the bug-report tip now points only at the error-screen button, and the feature tip describes Send feedback as leading to the chooser rather than pre-filling the form.
  • Hardened the popup assertions — all three e2e cases await popup.waitForURL(...) before reading popup.url(), so they no longer race the popup's initial about:blank on Firefox/WebKit.
  • Settled the truncation contract — openIssue now returns void instead of an unused truncated flag, its doc comment matches, and the in-text marker reads … [truncated to fit the link].

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

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.

Important

The new response-body redaction drops the error envelope used by the e2e stubs, so two feedback.spec.ts assertions now fail.

Reviewed changes

Reviewed the delta from e29b52a to 4713fb7: the instance-wide feedback toggle and the error-detail redaction.

  • Added the feedback toggle — migration 000084 adds workspace_settings.feedback_enabled, wired through the domain entity, service, repository, DTO, and handler, with a Switch in BrandingSettings; the user menu and ReportIssueButton now hide themselves when the cached branding says feedback is off.
  • Redacted error details — formatErrorDetails strips query strings/fragments from the request URL and keeps only top-level diagnostic keys from the response body, with unit tests for both cases.
  • Tightened the button contract — ReportIssueButton now requires error and reads the cached feedback flag synchronously via isFeedbackEnabledCached().

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread apps/web/src/lib/feedback.ts Resolved

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Reviewed changes

Reviewed the delta from 4713fb7 to a68bf611 (1 file): the test-only fix that aligns the e2e error stubs with the API's flat error envelope.

  • Updated both e2e stubs — failAgentsLoader and the inline /api/v1/admin/users route now return { success: false, error_code: "E2E_FORCED_ERROR", error: "forced e2e failure" } instead of a nested { code, message } object, so redactResponse keeps the diagnostic fields and the logs assertions on E2E_FORCED_ERROR hold again.

The previously open thread on feedback.ts:124 is now addressed and resolved.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit b316ae0 into master Nov 12, 2026
8 checks passed
@pikann
pikann deleted the feature/introduce-feedback-feature branch November 12, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant