Skip to content

fix: remove archive/unarchive functions for sponsor managed pages#922

Open
tomrndom wants to merge 3 commits intomasterfrom
fix/sponsor-pages-managed-archived
Open

fix: remove archive/unarchive functions for sponsor managed pages#922
tomrndom wants to merge 3 commits intomasterfrom
fix/sponsor-pages-managed-archived

Conversation

@tomrndom
Copy link
Copy Markdown

@tomrndom tomrndom commented May 8, 2026

ref: https://app.clickup.com/t/86b9tu22h

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Bug Fixes
    • Removed archive/unarchive functionality for managed pages in the Sponsor Pages tab. The managed pages table no longer supports archiving actions. Customized page archiving functionality remains unchanged and operational.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom requested a review from smarcet May 8, 2026 18:29
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The managed page archive handler function is removed from the component, along with its corresponding prop wiring to the managed pages table. Archive/unarchive UI functionality for managed pages is no longer active, while customized page archiving remains functional.

Changes

Managed Page Archive Handler Removal

Layer / File(s) Summary
Archive Handler and Table Wiring Removal
src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/index.js
Removes handleArchiveManagedPage function definition and deletes the onArchive prop that wired it to the managed pages table.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • fntechgit/summit-admin#809: Modifies archive handling in the same sponsor-pages-tab component, implementing archive/unarchive for customized pages.

Suggested reviewers

  • smarcet

Poem

🐰 A handler once logged with no care,
Left dangling in the air,
Now cleaned away with grace,
This code finds its place—
Removed like morning's rabbit hair! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title accurately describes the main change: removing archive/unarchive functionality for sponsor managed pages, which aligns with the code changes that deleted the handleArchiveManagedPage function and onArchive prop.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sponsor-pages-managed-archived

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/index.js`:
- Around line 202-215: The toggle logic currently reads item.is_archived but
some managed-page rows lack that flag, causing archive/unarchive to flip
incorrectly; update the data flow so the managed-page list includes is_archived
and that field is mapped into the reducer state before the UI uses it.
Specifically, ensure the API/listing call that builds items includes is_archived
in its selected fields, and modify the mapping function that reduces API results
into managedPages state (where managedPages, term, getSponsorManagedPages are
used) to set item.is_archived on each row; after that the branch using
item.is_archived with archiveManagedPage / unarchiveManagedPage will behave
correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 679d0279-476f-4c0f-9394-4fcdde246916

📥 Commits

Reviewing files that changed from the base of the PR and between 8994754 and bd75994.

📒 Files selected for processing (4)
  • src/actions/sponsor-pages-actions.js
  • src/i18n/en.json
  • src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/index.js
  • src/reducers/sponsors/sponsor-page-pages-list-reducer.js

Comment thread src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/index.js Outdated
tomrndom added 2 commits May 8, 2026 15:36
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom changed the title fix: add archive/unarchive functions for sponsor managed pages fix: remove archive/unarchive functions for sponsor managed pages May 8, 2026
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