Skip to content

Conversation

@nikitalokhmachev-ai
Copy link
Collaborator

@nikitalokhmachev-ai nikitalokhmachev-ai commented May 21, 2025

User description

This PR tackles #30.
Here are the items implemented:

  • Deslect all action (and hide controls)
  • Count of selected archives
  • Move the share action
  • Download as WACZ action
  • Delete selected pages action

PR Type

Enhancement


Description

  • Moved action buttons to top bar

  • Added progressive disclosure of actions

  • Implemented delete functionality

  • Added selection count and clear selection


Changes walkthrough 📝

Relevant files
Enhancement
argo-archive-list.ts
Selection management and event dispatching                             

src/argo-archive-list.ts

  • Added clearSelection() method to reset selected pages
  • Added event dispatching for selection changes
  • Fixed checkbox state to reflect selection status
  • +18/-6   
    bg.ts
    Backend deletion functionality                                                     

    src/ext/bg.ts

  • Implemented deletePages message handler
  • Added functionality to delete selected pages from storage
  • Added code to refresh page list after deletion
  • +21/-1   
    sidepanel.ts
    UI implementation of progressive disclosure                           

    src/sidepanel.ts

  • Added selectedCount property to track selections
  • Implemented conditional rendering for action buttons
  • Added top action bar with delete, share, download buttons
  • Removed bottom action buttons
  • Implemented onDeleteSelected() method
  • +96/-24 

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @pr-agent-monadical
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    30 - Fully compliant

    Compliant requirements:

    • Move action buttons from bottom bar to top
    • Show action buttons only when user selects one or more archives
    • Implement "Deselect all" action (and hide controls)
    • Show count of selected archives
    • Implement Share action
    • Implement Download as WACZ action
    • Implement Delete selected pages action
    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Commented Code

    There appears to be a commented reference to ReplayWeb.page's HTTP API in the deletePages handler. This should be removed or properly documented if it's meant as a guide for future development.

    // DELETE `${this.collInfo.apiPrefix}/page/${id}` :contentReference[oaicite:0]{index=0}
    Type Safety

    Multiple @ts-expect-error annotations are used throughout the code, particularly for the selectedCount property. Consider properly defining these properties in the class to avoid type errors.

    // @ts-expect-error - TS2339 - Property 'selectedCount' does not exist on type 'ArgoViewer'.
    this.selectedCount = 0;

    @nikitalokhmachev-ai
    Copy link
    Collaborator Author

    Found a bug related to ports disconnecting

    Copy link
    Collaborator

    @Shrinks99 Shrinks99 left a comment

    Choose a reason for hiding this comment

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

    Looks good! Lets merge it :)

    @Shrinks99 Shrinks99 linked an issue May 22, 2025 that may be closed by this pull request
    @nikitalokhmachev-ai nikitalokhmachev-ai merged commit 3c6bc13 into main May 22, 2025
    1 of 4 checks passed
    @Shrinks99 Shrinks99 deleted the nikita-progressive-disclosure branch May 22, 2025 16:20
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    Progressive disclosure action buttons

    4 participants