Skip to content

fix(access-requests): align permission checks and pending request flows - #7880

Merged
waleedlatif1 merged 5 commits into
stagingfrom
codex/access-request-review-7876
Sep 16, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
codex/access-request-review-7876

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Match permission reads to the active deployment regime and validate stored policy changes against each field's canonical schema.
  • Discover the selected target before submission and show existing pending requests. Preserve deployment ceilings, stored grants, and Browse access filters.
  • Render canonical integration names in approval summaries and Before/After details, collapsing equivalent versions with compact, deterministically generated display metadata.
  • Reuse shared controls and settings recovery states, trim redundant UI copy, and preserve requester/reviewer URL state through login with nuqs.
  • Refresh the affected member's cached credit limit after approval, close request dialogs when the member limit recovers, and prevent them from reopening when eligibility returns.

Type of Change

  • Bug fix

Testing

269 focused application tests and 5 generator tests passed across authorization, review, dialog states, query invalidation, login redirects, toolbar, and workspace prefetch. Full repository lint, all 26 workspace type-checks, all 46 audits, block-registry validation, and docs-manifest verification passed. Generated metadata checks also passed under Danish and Swedish locales. Five database integration tests require the dedicated CI database harness and were skipped locally. Visually checked the actual components with local API fixtures, including collapsed/expanded approval spacing, readable names, shared switches, history, settings errors, and permissions refresh messaging.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 16, 2026 6:41pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regression or outstanding previous finding remains.

Summary

This PR aligns permission reads with the active deployment regime and strengthens access-request discovery, validation, pending-request navigation, cache refreshes, and dialog lifecycle behavior.

  • Preserves supported access-request URL state through authentication.
  • Validates policy changes against canonical field schemas and renders canonical integration names.
  • Adds target-specific discovery before submission and redirects users to existing pending requests.
  • Keeps request history usable while settings load or fail independently.
  • Refreshes usage-limit state after approval and closes request dialogs when eligibility recovers.
  • Makes generated block-name metadata deterministic across runtime locales.
Diagram
sequenceDiagram
    participant U as User
    participant UI as Access Request UI
    participant D as Target Discovery
    participant API as Request API
    participant Q as Permission/Usage Cache

    U->>UI: Open request action
    UI->>D: Discover selected target
    alt Existing pending request
        D-->>UI: pendingRequestId
        UI-->>U: Open existing request
    else Target is requestable
        D-->>UI: Requestable target
        U->>UI: Submit request
        UI->>API: Create access request
    else Access already granted or unavailable
        D-->>UI: Current eligibility
        UI-->>U: Show current state
    end

    API->>Q: Invalidate affected permission/usage data
    Q-->>UI: Refreshed eligibility
    UI-->>U: Close obsolete dialog after recovery
Loading

Reviews (7) · Last reviewed commit: "fix(access-requests): clear recovered li..."

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 13 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/components/access-requests/request-access-action.tsx
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

The import-order finding conflicts with the repository's active formatter configuration. In biome.json, the :PACKAGE: group includes both @sim/emcn and next/navigation, and Biome orders the scoped package first. I tested the suggested order with and without a separating blank line: both fail Biome, and biome check --write restores the exact current source. Full repository lint and CI lint pass with the current order. Keeping the formatter-enforced order avoids a lint regression or an unrelated repository-wide configuration change.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Comment thread apps/sim/components/access-requests/request-access-action.tsx
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 force-pushed the codex/access-request-review-7876 branch from 55ab2fd to e2bf544 Compare September 16, 2026 18:14
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 31 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread scripts/generate-block-successors.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 31 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit f9ad878 into staging Sep 16, 2026
33 of 34 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/access-request-review-7876 branch September 16, 2026 18:47

This branch was successfully deployed

1 active deployment
Preview 07b3514a Deployed Sep 16, 2026 by vercel[bot]
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