Skip to content

feat: add global feedback submit shortcut#116

Merged
blimmer merged 1 commit into
mainfrom
feat/global-feedback-submit-shortcut
May 14, 2026
Merged

feat: add global feedback submit shortcut#116
blimmer merged 1 commit into
mainfrom
feat/global-feedback-submit-shortcut

Conversation

@blimmer
Copy link
Copy Markdown
Contributor

@blimmer blimmer commented May 14, 2026

Summary

Adds CMD/CTRL+Enter submission support to the overall feedback textarea, reusing the existing textarea-scoped shortcut hook and the same submission path as the contextual submit button. The shortcut respects submitting/submitted guards, and browser coverage now exercises the new keyboard path plus newline behavior.

Closes #113.

Review focus

Please focus on the shortcut wiring between GlobalCommentComposer and SubmitBar's submission state, especially that the handler stays textarea-scoped and does not conflict with inline annotation popovers. Also worth checking: the new shared createDeferred test helper and the added testing guidance for future agents.

Commits

  • 51230e1 — add global feedback keyboard submit support and tests.

@blimmer blimmer force-pushed the feat/global-feedback-submit-shortcut branch from 51230e1 to 161c8b1 Compare May 14, 2026 15:59
- **Export component test IDs as a colocated object from the component file.** Each React component that exposes test selectors declares its own \`xxxTestIds\` object next to the component definition and exports it. Tests import this object directly, never using string literals for test IDs. The naming pattern is \`\<componentName>TestIds\`.
- **Prefer `toMatchObject` for structured payload assertions.** When a test verifies several fields on the same object or nested payload, use one `expect(value).toMatchObject({ ... })` instead of a run of field-by-field assertions. Keep separate assertions for orthogonal behavior, clearer failure messages, or values that need a specialized matcher.

- **Use the shared deferred-promise helper; do not hand-roll it.** Tests that need manual promise resolution should import `createDeferred` from `@contextbridge/shared/testHelpers`. Do not recreate local `Deferred` types or `new Promise` wrappers in individual test files.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Trying to guide the agent to quit doing this

import { describe, expect, it } from 'bun:test';
import { createDeferred } from './testHelpers.ts';

describe('createDeferred', () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hoisting this

@blimmer blimmer marked this pull request as ready for review May 14, 2026 16:02
@blimmer blimmer requested a review from jcarver989 as a code owner May 14, 2026 16:02
@blimmer blimmer merged commit 21b14a1 into main May 14, 2026
16 checks passed
@blimmer blimmer deleted the feat/global-feedback-submit-shortcut branch May 14, 2026 16:05
blimmer pushed a commit that referenced this pull request May 14, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.0](v0.5.0...v0.6.0)
(2026-05-14)


### Features

* add global feedback submit shortcut
([#116](#116))
([21b14a1](21b14a1))
* allow configuring PlanBridge port
([#95](#95))
([bf53148](bf53148))
* tell Codex to run contextbridge open outside the sandbox
([#115](#115))
([6cff1e9](6cff1e9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: contextbridge-pr-automation[bot] <259134118+contextbridge-pr-automation[bot]@users.noreply.github.com>
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.

feat: submit on CMD/CTRL+Enter from the overall feedback textarea

2 participants