Repository navigation
fix(organization-search): hide the block where Search is off, isolate the Slack identity sweep in the People cron - #10589
Merged
Conversation
… Search; isolate the Slack identity sweep in the People cron - getBlockVisibility disables the Organization Search block, as a kill switch does, for a personal workspace or an organization without Search, so every discovery surface (toolbar, search, mentions, tool pickers, the Assistant's workflow authoring, the catalog) stops offering a block that always fails there. Execution of placed blocks is not gated. - The People cron logs and names a failed sweep in failed, reports the other sweep's count, and fails the invocation only when the directory sweep fails.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; both previous findings are fixed and no new actionable issues were found. SummaryHides Organization Search where Search is unavailable and reports the two People cron sweeps separately.
Reviews (2) · Last reviewed commit: "fix(organization-search): hide only the ..." · Reviewed by Greptile |
…n its Search availability cannot be read
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
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
Two release-readiness fixes from the infra audit.
1. Hide the Organization Search block where it can't run
getBlockVisibilitynow disables theorganizationblock, the same way the block-visibility kill switch does, for a personal workspace (no organization) or an organization without Search. It uses the same check that refuses the block's runs (isKnowledgeMemberAccessAvailable).Not done: hiding
list_my_activitywhile themy-activityflag is off. Block visibility is keyed by block type, and dropdown options have no per-organization or per-flag gate: option functions are evaluated without workspace context. The closest supported behavior is already in place:Hiding the option would need a new options gate, e.g. a host-context feature that dropdown option functions can read; that should get its own design.
2. Isolate the Slack identity sweep in the People cron
Before, a Slack identity sweep error made
/api/cron/people-directory-syncreturn 500 even though the directory sync had committed. Now each sweep is settled on its own:failedfieldThe route contract gains the optional
failedarray. No generated or Assistant contract file changes; no migration.Type of Change
Testing
block-visibility.test.ts: the block is hidden for an organization without Search and for a workspace outside any organization, and offered where Search is on.people-directory-sync/route.test.ts: a Slack sweep failure returns 200 with the directory count andfailed: ['slackIdentities']; a directory failure returns 500 that still reports the Slack count.Checklist
test-auditauthoring gate)