feat: add global feedback submit shortcut#116
Merged
Conversation
51230e1 to
161c8b1
Compare
blimmer
commented
May 14, 2026
| - **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. |
Contributor
Author
There was a problem hiding this comment.
Trying to guide the agent to quit doing this
| import { describe, expect, it } from 'bun:test'; | ||
| import { createDeferred } from './testHelpers.ts'; | ||
|
|
||
| describe('createDeferred', () => { |
jcarver989
approved these changes
May 14, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
GlobalCommentComposerandSubmitBar's submission state, especially that the handler stays textarea-scoped and does not conflict with inline annotation popovers. Also worth checking: the new sharedcreateDeferredtest helper and the added testing guidance for future agents.Commits
51230e1— add global feedback keyboard submit support and tests.