Skip to content

fix: hide Present button until explicitly enabled - #688

Merged
appflowy merged 1 commit into
mainfrom
codex/hide-present-button
Nov 1, 2026
Merged

appflowy merged 1 commit into
mainfrom
codex/hide-present-button

Conversation

@appflowy

@appflowy appflowy commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Hide the Present button from document, full-page row, and page-modal headers until explicitly enabled. Both header entry points use a shared PRESENTATION_ENTRY_ENABLED = false flag, with the re-enable instruction documented in the presentation README.

Validation

  • pnpm type-check passed.
  • ESLint passed for all changed TypeScript files.
  • Existing RightMenu and ViewModal Jest suites passed: 30 tests.
  • Verified in Chrome on localhost:3000, including a reload ignoring cache: Present is absent and Share remains visible.

Checklist

General

  • Included relevant documentation or comments.
  • Tested in multiple environments; verification covered local Chrome.

Testing

  • Added or updated tests; this temporary visibility change uses the existing header/modal suites.

Feature-Specific

  • Added a feature preview; not applicable to hiding an existing button.
  • Verified integration with existing functionality.

Summary by Sourcery

Temporarily hide the Present entry point across supported headers until it is explicitly re-enabled.

Enhancements:

  • Gate Present buttons in document, full-page row, and page-modal headers behind a shared disabled feature flag.

Documentation:

  • Document how to re-enable the Present entry point when requested.

Chores:

  • Add a presentation feature flag that keeps the Present button disabled by default.

@sourcery-ai

sourcery-ai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Temporarily hides the Present button across document, full-page row, and page-modal headers through a shared disabled-by-default feature flag, with documentation explaining how to re-enable it.

File-Level Changes

Change Details Files
Added a shared feature flag that gates the Present entry point in all relevant headers.
  • Introduced PRESENTATION_ENTRY_ENABLED, defaulting to false.
  • Guarded document, full-page row, and page-modal Present buttons while leaving Share available.
  • Documented the flag and re-enable procedure in the presentation README.
src/components/presentation/feature-flags.ts
src/components/app/header/RightMenu.tsx
src/components/app/ViewModal.tsx
src/components/presentation/README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="src/components/presentation/README.md" line_range="5" />
<code_context>

 This feature provides **Present document**, **Present AI mind map**, and **AI Slides** in the signed-in app. Document presentation uses a read-only editor snapshot; AI operations use authenticated AppFlowy Cloud presentation APIs.

+The **Present** button is temporarily hidden in page and modal headers. Keep `PRESENTATION_ENTRY_ENABLED` in [`feature-flags.ts`](./feature-flags.ts) set to `false` until explicitly asked to enable it.
+
 ## Run locally
</code_context>
<issue_to_address>
**README points to hidden button**

When a reader follows the presentation README while the flag is false, `feature-flags.ts` sets the flag to `false`, but the README still says “Present beside Share opens” the presentation options. Readers following that instruction cannot find the entry point in page or modal headers.

Qualify or remove the README bullet that says Present is available beside Share while the entry point is disabled.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨


This feature provides **Present document**, **Present AI mind map**, and **AI Slides** in the signed-in app. Document presentation uses a read-only editor snapshot; AI operations use authenticated AppFlowy Cloud presentation APIs.

The **Present** button is temporarily hidden in page and modal headers. Keep `PRESENTATION_ENTRY_ENABLED` in [`feature-flags.ts`](./feature-flags.ts) set to `false` until explicitly asked to enable it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚪ Low · README points to hidden button

When a reader follows the presentation README while the flag is false, feature-flags.ts sets the flag to false, but the README still says “Present beside Share opens” the presentation options. Readers following that instruction cannot find the entry point in page or modal headers.

Qualify or remove the README bullet that says Present is available beside Share while the entry point is disabled.

Prompt for AI agents
In `src/components/presentation/README.md` at line 5:

**README points to hidden button**

When a reader follows the presentation README while the flag is false, `feature-flags.ts` sets the flag to `false`, but the README still says “Present beside Share opens” the presentation options. Readers following that instruction cannot find the entry point in page or modal headers.

Qualify or remove the README bullet that says Present is available beside Share while the entry point is disabled.

@appflowy
appflowy merged commit 90721bd into main Nov 1, 2026
22 of 31 checks passed
@appflowy
appflowy deleted the codex/hide-present-button branch November 1, 2026 02:16
appflowy added a commit that referenced this pull request Nov 1, 2026
…access hints (#689)

- Load failures in the slides dialog use a centered AppFlowy error state
  (icon, title, message, Back to page / Retry buttons) instead of left-aligned
  text with legacy buttons.
- A presented mind map or document that cannot load closes and shows an
  AppFlowy toast instead of a full-screen error page. Mind map empty states
  use the same centered component.
- The header Present button (hidden for everyone by #688) now shows only on
  official AppFlowy Cloud: usePresentationEntryEnabled() follows
  useIsOfficialHosted(), so self-hosted servers never see it.
- In the Present menu, AI mind map and AI ppt stay visible but unavailable
  for workspace guests (the server requires a member or owner) and for users
  without edit access to the page, with the reason shown on hover/focus.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.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.

1 participant