Skip to content

fix: keep the Quip signer available in production bundles - #7

Merged
ruseinov merged 22 commits into
v0.3from
fix/drop-prod-signer-guard
Oct 10, 2026
Merged

ruseinov merged 22 commits into
v0.3from
fix/drop-prod-signer-guard

Conversation

@quip-infra

Copy link
Copy Markdown

Follow-up to #4: the production-condition fix mentioned there.

shouldInjectQuipSigner() returns false whenever NODE_ENV === 'production'. yarn build:www builds with mode: 'production', so in any deployed portal the signer is compiled out and QUIP_DEV_SIGNER, ?quipSigner and the localStorage toggle do nothing. This drops the check. The signer stays opt-in through those three switches. The Quip portal has run this same change since August.

Checked locally on v0.2 (0a0f178):

  • initQuipSigner.spec.ts passes 4/4 (2 fail without the change).
  • With QUIP_DEV_SIGNER=1 yarn build:www, the bundle contains "Quip dev signer injected" and "Quip Alice". Without the change, neither string is present.

🤖 Generated with Claude Code

ruseinov and others added 21 commits June 19, 2026 00:57
wrapTx/extractParams run before any queueSetTxStatus call in _onSend and
_onSign, so a failure there (e.g. a view-only Quip account with an
unavailable signing key) left the queue item pending and stalled
auto-submitting queues. Catch, mark the item as error with the underlying
message, and rethrow so the modal error handler still fires.
`yarn build:www` builds with webpack `mode: 'production'`, and
webpack.base.cjs inlines NODE_ENV through DefinePlugin. The
`NODE_ENV === 'production'` short-circuit in shouldInjectQuipSigner()
therefore folds to a constant `false` in every deployed portal: webpack
drops the signer init path and the dev seeds, and QUIP_DEV_SIGNER,
`?quipSigner` and the localStorage toggle all stop working.

Drop the short-circuit. The signer stays opt-in through those three
explicit switches. The spec now checks that a production bundle stays
off by default and turns on with QUIP_DEV_SIGNER.

Checked with `QUIP_DEV_SIGNER=1 yarn build:www`: with this change the
bundle contains "Quip dev signer injected" and "Quip Alice"; without it,
neither string is present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@augmentcode

augmentcode Bot commented Oct 8, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Removes the production guard so deployed bundles retain the Quip signer, while preserving environment, query-string, and localStorage opt-in switches.
Updates gating tests to verify that production requires explicit enablement.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode 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.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@ruseinov
ruseinov changed the base branch from v0.2 to v0.3 October 10, 2026 14:38
@ruseinov
ruseinov merged commit 8bc3cde into v0.3 Oct 10, 2026
@ruseinov
ruseinov deleted the fix/drop-prod-signer-guard branch October 10, 2026 15:26
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.

2 participants