Skip to content

feat: Add "Export Filtered Results" - Download Org List as CSV / JSON - #1883

Open
ida-jemi wants to merge 9 commits into
S3DFX-CYBER:mainfrom
ida-jemi:feat/export-filtered-results
Open

feat: Add "Export Filtered Results" - Download Org List as CSV / JSON#1883
ida-jemi wants to merge 9 commits into
S3DFX-CYBER:mainfrom
ida-jemi:feat/export-filtered-results

Conversation

@ida-jemi

@ida-jemi ida-jemi commented Jun 15, 2026

Copy link
Copy Markdown

Program

Program: GSSoC

📌 Related Issue

Closes #1746

Issue Description

Add an "Export Filtered Results" feature that allows users to download the currently filtered list of GSoC organizations in either CSV or JSON format. This helps users save, analyze, and share filtered organization data without manually copying information.


✨ What I Changed

Added Export Functionality

  • Implemented Export as CSV option.
  • Implemented Export as JSON option.
  • Exported data reflects the currently filtered organization list.
  • Generated files are automatically downloaded to the user's device.

UI Enhancements

  • Added export controls/buttons in an intuitive location.
  • Maintained consistency with the existing design and styling.
  • Ensured a seamless user experience across different screen sizes.

Data Handling

  • Structured exported CSV data with appropriate headers.
  • Preserved organization details accurately in JSON format.
  • Added safeguards to handle empty or filtered datasets gracefully.

📸 Screenshots

Screenshot 2026-06-15 224237

🧪 Testing

Tested Scenarios

  • Exporting all organizations.
  • Exporting filtered organizations.
  • CSV file generation and download.
  • JSON file generation and download.
  • Empty filter result handling.
  • Cross-browser functionality checks.

📂 Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Documentation Update
  • Code Refactoring
  • Performance Improvement
  • UI/UX Enhancement

✅ Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.
  • I have tested on mobile view and laptop view both.
  • The feature works as intended.
  • Existing functionality remains unaffected.

🎯 Result

Users can now easily export their currently filtered GSoC organization list in CSV or JSON format, making it easier to track, compare, and shortlist organizations for GSoC preparation.

Review in cubic

@ida-jemi
ida-jemi requested a review from S3DFX-CYBER as a code owner June 15, 2026 19:50
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@ida-jemi is attempting to deploy a commit to the s3dfx-cyber's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

💬 Faster Reviews & Assignments

Hi @ida-jemi, for faster coordination and smoother communication, consider joining our Discord community:

👉 https://discord.gg/jYrbHKtn8t

Useful Channels

  • #issue-links-for-assignment → Share issue links for assignment help
  • #pr-links-for-review → Share PR links for mentor/maintainer review

Please avoid spamming channels or repeatedly pinging mentors/maintainers.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

⚠️ DCO Sign-off Missing

Hi @ida-jemi 👋

Some commits in this PR are missing a valid Signed-off-by line.

Invalid Commits

  • d95bfac
  • d876f2f

Fix Single Commit

git commit --amend --signoff
git push --force-with-lease

Fix Multiple Commits

git rebase --signoff HEAD~N
git push --force-with-lease

This comment updates automatically after fixes are pushed.

@github-actions github-actions Bot added gssoc26 GirlScript Summer of Code 2026 missing-program-classification labels Jun 15, 2026
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

✅ Program Classification Verified

Detected contribution program:

  • GSSOC

Program-aware automation and routing are now enabled for this PR.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

✅ PR Validation Passed

Hi @ida-jemi, automated PR validation checks passed.

Your PR is ready for review.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Organizations section header in index.html is updated to display a "Showing N of X organizations" count and a new Export dropdown with CSV and JSON download options. Five new global JS functions implement dropdown toggling, outside-click dismissal, client-side file generation using Blob and createObjectURL, Escape key dismissal, and button state management. Additionally, accessibility markup improvements are applied across four form input elements to enhance label wiring and ARIA attributes.

Changes

Organizations Export and Accessibility Improvements

Layer / File(s) Summary
Export dropdown UI and rendering integration
index.html
Replaces the Organizations directory header with a flex layout displaying <strong id="orgCount"> and data-org-total for the count display, and adds an Export dropdown button offering "Download CSV" and "Download JSON" options that call exportResults(format). Integrates calls to updateExportButtonState(0) when the filtered list is empty and updateExportButtonState(filteredOrgs.length) after cards are rendered to manage button visibility and tooltip state.
Export JS functions and dropdown behavior
index.html
Implements toggleExportDropdown() to manage menu visibility with outside-click dismissal and aria-expanded state toggling, downloadFile() using Blob and URL.createObjectURL for browser downloads, exportResults(format) to generate timestamped CSV or JSON files with proper CSV field quoting and escape handling, updateExportButtonState(count) to disable the export button when no results are available, showExportToast(msg) for "no results" messaging, and extends document-level Escape key handling to close the dropdown with aria-expanded reset.
Accessibility improvements to form inputs
index.html
Adds explicit <label> elements with for attributes, aria-label attributes on hidden inputs, and aria-describedby references to the organizations search input, AI recommender resume file upload (with accept=".txt"), proposal builder autosave toggle, and org picker modal search input to improve semantic accessibility and screen reader experience.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

gssoc, level:intermediate

Suggested reviewers

  • S3DFX-CYBER
  • TarunyaProgrammer
  • nihalawasthi
  • KUMARNiru007

Poem

🐇 Hop, hop! The filtered list takes flight,
CSV and JSON shining bright,
With labels clear and ARIA true,
The rabbit made your forms accessible too!
Export your dreams, dear GSoC friend —
No filtered result shall fade or end! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main feature added: an export functionality for filtered results in CSV and JSON formats, matching the core changeset.
Description check ✅ Passed The description is directly related to the changeset, detailing the export feature implementation, UI enhancements, testing scenarios, and results.
Linked Issues check ✅ Passed All acceptance criteria from issue #1746 are met: export dropdown button with CSV/JSON options, filtering current results only, proper CSV columns with 'Tags' header, JSON export with full objects, mobile responsiveness, vanilla JavaScript implementation, disabled state for empty results, and keyboard support.
Out of Scope Changes check ✅ Passed All changes are directly related to the export feature requirements: export functions, export button state management, toast notifications for empty results, and accessibility improvements are all in scope for issue #1746.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-project-automation github-project-automation Bot moved this to Todo in GSSOC 26 Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for opening a PR, @ida-jemi!

Your PR has entered the 🚦 PR Review Pipeline.

🟢 GSSOC PR detected — your PR will be routed through the GSSOC mentor review pipeline.


🔄 Review Flow

Stage Reviewer Purpose
Stage 1 🤖 Automation Validation · Duplicate Detection · AI/Slop Checks · Formatting · PR Analysis
Stage 2 🧑‍🏫 GSSOC Mentor Code Review · Scope Validation · Quality Check
Stage 3 🔑 Project Admin / Maintainer Final Approval & Merge Decision

The automated PR analysis system will verify issue linkage, PR relevance, and contribution quality.

A pipeline status comment may appear automatically as your PR progresses.


✅ Contributor Checklist

  • Sign commits using git commit -s
  • Link a valid issue (Closes #123)
  • Keep changes focused and relevant
  • Do not include unrelated modifications
  • Ensure workflows/build/tests are passing
  • Read the appropriate contributor guide:

⚠️ Important Notes

  • Low-quality, spammy, or AI-generated PRs may be closed
  • PRs without linked issues may fail automated checks
  • Large unrelated PRs are likely to be rejected
  • Review times may vary depending on mentor/reviewer availability

Happy contributing 🚀

This message is posted automatically and only once.

@github-actions github-actions Bot added size/m gssoc-review gssoc26 GirlScript Summer of Code 2026 and removed gssoc26 GirlScript Summer of Code 2026 labels Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 TENET Agent Review

📋 Summary

This pull request introduces a new feature to export the currently filtered list of GSoC organizations into either CSV or JSON format. The implementation includes new UI elements for an export dropdown and client-side JavaScript functions to handle data retrieval, formatting, and file downloads. The approach is sound for client-side data export, providing useful functionality and considering basic data integrity.

🔐 Security Findings

  • [LOW] index.html - The getFilteredOrgs function relies on a global filteredOrgs array. While this PR doesn't introduce a vulnerability, relying on global state can be risky if the filteredOrgs array itself could be manipulated via client-side injection (e.g., XSS) in other parts of the application. The export mechanism itself is robust, with CSV escaping preventing basic CSV injection.

🧹 Code Quality

  • index.html - Global Scope Pollution: All new JavaScript functions (toggleExportDropdown, getFilteredOrgs, downloadFile, exportResults, updateExportButtonState) are defined in the global scope. This can lead to naming conflicts and makes the codebase harder to manage. Consider encapsulating these functions within an IIFE or a dedicated module.
  • index.html - L5408 (JS logic in HTML): Embedding all JavaScript logic directly into index.html mixes concerns and makes the file very large. For better maintainability and separation, consider moving this JavaScript into a separate .js file.
  • index.html - L5490 (getFilteredOrgs incomplete fallback): The fallback logic for getFilteredOrgs currently returns an empty array ([]) if filteredOrgs is not defined. The comment suggests it should "fall back to reading visible cards," but the implementation doesn't do that. This could lead to unexpected "No organizations to export" messages even if cards are visible.
  • index.html - L5529 (updateExportButtonState not called): The updateExportButtonState function is defined but is not called anywhere in the provided diff. This means the export button will not be disabled when there are zero results, which contradicts the intended functionality. It needs to be hooked into the filtering and rendering logic that updates the orgCount.

✅ What's Done Well

  • Accessibility (ARIA attributes): The dropdown implementation includes appropriate ARIA attributes (aria-haspopup, aria-expanded, aria-controls, role="menuitem") which significantly improve accessibility.
  • CSV Injection Prevention: The escape function for CSV export correctly handles double quotes by escaping them (""), which is a good practice to prevent potential CSV injection vulnerabilities.
  • Clear UI and UX: The UI for the export feature is well-integrated, and the description indicates attention to user experience, including intuitive placement and consistent styling. Timestamped filenames are also a good usability feature.

📝 Overall Verdict

REQUEST CHANGES - Functional issues with getFilteredOrgs fallback and uncalled updateExportButtonState need to be addressed.

@github-actions github-actions Bot added gssoc26 GirlScript Summer of Code 2026 and removed missing-program-classification gssoc26 GirlScript Summer of Code 2026 labels Jun 15, 2026

@TarunyaProgrammer TarunyaProgrammer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  • Export dropdown behavior, reset state, and Escape key handling work correctly.
  • getFilteredOrgs has been removed.
  • CSV export now uses Tags instead of Languages.
  • Accessibility improvements for the export controls and org picker search input are in place.
  • The filteredOrgs scope issue has been resolved by exposing the active filtered list through a shared getter, allowing exports to access the current filtered dataset correctly.
  • Tests and lint checks are passing.

The implementation now aligns with the requested changes. LGTM.

@S3DFX-CYBER S3DFX-CYBER left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This adds an "Export Filtered Results" feature — a dropdown in the org filter bar with CSV and JSON export options, plus a toast notification for empty results. The implementation is clean: the CSV uses proper double-quote escaping, the JSON export includes all relevant org fields, and the download is triggered via a Blob URL with proper cleanup (URL.revokeObjectURL). The export button is disabled when there are 0 results. Accessibility is well-handled — aria-haspopup, aria-expanded, aria-controls, role="menu"/role="menuitem", and Escape-to-close.

There's no linked issue. Add a Closes #N.

The CSV export uses githubUrlFromValue(org.github) — verify this function exists in scope. It's used elsewhere in the codebase but make sure it's accessible from the inline script where exportResults is defined.

The downloadFile function creates an <a> element, appends it to document.body, clicks it, then removes it. This is the standard pattern for triggering downloads. The URL.revokeObjectURL cleanup is correct.

The toast notification (#exportToast) uses role="alert" with aria-live="assertive" — this is appropriate for the empty-results error case. The 3-second timeout before hiding is reasonable.

The PR also includes several accessibility improvements unrelated to the export feature: aria-label on the hidden searchInput, aria-label on the resume file upload input, a <label for="pwAutosaveToggle"> fix (moving <p id="pwPrivacyNote"> outside the <label> so it's not part of the label text), and aria-label on the org picker search input. These are good fixes but should be in their own PR or at least called out in the PR description.

The <label for="pwAutosaveToggle"> fix is important — previously the privacy note paragraph was inside the <label>, which meant screen readers would read the entire paragraph as part of the checkbox label. Moving it outside is correct.

The export dropdown menu markup uses role="menu" and role="menuitem" — same ARIA concern as #2053: without full menu keyboard navigation (roving tabindex, arrow keys), these roles don't match the actual interaction. Since this is a simple two-item dropdown with click handlers, consider using role="group" or no explicit roles and relying on the button semantics. Or implement the full ARIA menu pattern if you want the roles.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📏 Large PR Detected

This PR has 4493 lines changed (3848+ / 645-).

Large PRs are harder to review and more likely to introduce issues. Consider splitting into smaller, focused PRs when possible.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ Suspicious Generated Code Detected

This PR contains patterns commonly associated with low-quality AI-generated submissions.

Detected Signals

  • Generated-style separators detected
  • Excessive comments in .github/workflows/pr-stage-manage.yml
  • Generated-style separators detected
  • Excessive comments in .github/workflows/pr-validator.yml
  • Generated-style separators detected
  • Excessive comments in .github/workflows/pr-welcome-bot.yml
  • Generated-style separators detected
  • Excessive comments in .github/workflows/program-classification-validator.yml
  • Generated-style separators detected
  • Excessive comments in README.md
  • Large insertion in data/mentors.json (+380)
  • Excessive comments in data/mentors.json
  • Large insertion in index.html (+758)
  • Excessive comments in index.html
  • Multiple helper functions added in index.html
  • Large insertion in landing.html (+1121)
  • Large insertion in src/js/landing.js (+412)
  • Excessive comments in src/js/landing.js
  • Multiple helper functions added in src/js/landing.js
  • Large insertion in src/js/recommendation-ui.js (+167)
  • Excessive comments in src/js/recommendation-ui.js
  • Multiple helper functions added in src/js/recommendation-ui.js
  • Multiple helper functions added in src/js/recommender.js
  • Large insertion in src/landing.css (+320)
  • Excessive comments in src/landing.css

A maintainer or mentor should manually review this PR before merge.

This is not an automatic rejection.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🚦 PR Review Pipeline

🟢 GSSOC PR

Stage Status
Stage 1 — Automated Checks ❌ Failed — fixes required
Stage 2 — Mentor/Reviewer 🔒 Blocked until Stage 1 passes
Stage 3 — Maintainer 🔒 Blocked until Stage 2 passes
  • DCO verification pending
  • DCO sign-off missing

Last updated: Sat, 08 Aug 2026 17:01:12 GMT

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🤖 TENET Agent Review

📋 Summary

This pull request introduces a new "Export Filtered Results" feature, allowing users to download the currently displayed GSoC organizations in CSV or JSON format. It also includes significant updates to the GitHub workflows, enhancing PR classification logic with dual-label guards and improved error handling. Frontend UI/UX has been refined for both desktop and mobile views, particularly for filtering and the new export functionality.

🔐 Security Findings

  • [LOW] script.js - The exportResults function for CSV format does not sanitize data for potential CSV injection vulnerabilities. If any organization data (e.g., names, descriptions) contains values starting with =, +, -, or @, these could be interpreted as formulas by spreadsheet software, potentially leading to arbitrary command execution or data exfiltration when opened by a user.
    Recommendation: Implement basic sanitization for CSV fields by prepending a single quote ' to any field that starts with a special character (=, +, -, @) to force interpretation as text.

🧹 Code Quality

  • index.html - The HTML for the "Export Dropdown" (exportDropdownWrapper and its contents) is duplicated. It appears once within the desktop filter section and again within the mobile filter section. This leads to redundant code and potential inconsistencies.
    Suggestion: Consolidate the export dropdown HTML into a single element and manage its visibility/placement via CSS or JavaScript for different screen sizes, or ensure it's only rendered once in a shared location.
  • script.js - The closeAllDropdowns() function, while useful, might inadvertently close a dropdown that was just opened or is currently being interacted with if not carefully managed.
    Suggestion: Consider modifying closeAllDropdowns() to accept an optional element or ID to exclude from closing, allowing for more precise control when chaining dropdown interactions.

✅ What's Done Well

  • The PR significantly improves the robustness and reliability of the GitHub workflows by implementing dual-label guards for program classification and adding comprehensive error handling for comment updates.
  • The new export functionality is well-implemented in script.js, providing clear and functional CSV and JSON download options.
  • The UI/UX enhancements for both desktop and mobile, including the new mobile filter dropdowns and the export feature, demonstrate a strong focus on user experience and accessibility.

📝 Overall Verdict

REQUEST CHANGES - Address the HTML duplication and implement CSV injection sanitization.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 8, 2026

@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 32 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.

Re-trigger cubic

Comment thread .github/workflows/program-classification-validator.yml
Comment thread src/js/app.js
Comment thread index.html
Comment thread .github/workflows/pr-validator.yml
Comment thread src/components/footer.html
Comment thread .github/workflows/pr-stage-manage.yml
Comment thread package.json
Comment thread .github/workflows/pr-welcome-bot.yml
Comment thread privacy.html
Comment thread index.html
Signed-off-by: J. Ida Jemi <idajemi.9i@gmail.com>

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🤖 TENET Agent Review

📋 Summary

This pull request introduces a new feature allowing users to export the currently filtered list of GSoC organizations in either CSV or JSON format. The implementation is entirely client-side, generating and downloading files directly from the browser based on the filteredOrgs data. It includes UI enhancements for an export dropdown, accessibility improvements, and handles empty datasets gracefully.

🔐 Security Findings

No security issues found. The client-side nature of the export, combined with proper CSV escaping and JSON.stringify for JSON output, mitigates common data injection risks for the generated files. No sensitive data is handled beyond what is publicly displayed on the page.

🧹 Code Quality

  • index.html (JS section) - Inline Event Handlers: The use of onclick attributes (e.g., onclick="toggleExportDropdown()", onclick="exportResults('csv')") couples HTML directly with JavaScript logic. It's generally better practice to attach event listeners programmatically in JavaScript for cleaner separation of concerns and improved maintainability.
  • index.html (JS section) - Global Variable Dependency: The exportResults function directly depends on the global filteredOrgs variable. While common in single-file scripts, for larger applications, passing data explicitly or encapsulating state within modules/objects can improve clarity and prevent unintended side effects.
  • index.html (JS section) - Redundant Dropdown Closing Logic: The logic to close the export dropdown is duplicated in toggleExportDropdown and the global document.addEventListener('click') handler. This could be refactored into a single closeExportDropdown helper function to reduce redundancy and improve maintainability.
  • index.html (JS section) - Undefined Function Reference: The function githubUrlFromValue(org.github) is called within exportResults but its definition is not present in the provided diff. Assuming it exists elsewhere in the global scope, it's good practice to ensure all called functions are either defined or explicitly imported.

✅ What's Done Well

  1. Accessibility Improvements: The PR includes good accessibility practices by adding aria-label, aria-haspopup, aria-expanded, and role attributes to the new UI elements, as well as improving existing elements like searchInput and orgPickerSearch.
  2. Robust CSV Escaping: The implementation of CSV export correctly handles special characters by doubling double quotes (replaceAll('"', '""')), which is crucial for preventing CSV injection vulnerabilities when the file is opened in spreadsheet software.
  3. Graceful Empty State Handling: The updateExportButtonState function and the showExportToast message provide clear feedback and disable the export functionality when no organizations match the current filters, enhancing user experience.

📝 Overall Verdict

REQUEST CHANGES - Minor code quality improvements are recommended for better maintainability and consistency.


Review powered by TENET Agent 🛡️ | Triggered automatically on PR #1883

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 8, 2026

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🤖 TENET Agent Review

📋 Summary

This pull request introduces a new feature allowing users to export the currently filtered list of GSoC organizations into CSV or JSON format. The implementation includes a new UI dropdown for export options, client-side JavaScript functions for data formatting and file download, and significant accessibility enhancements. The approach is generally sound for a client-side data export feature, but there are minor security and code quality improvements to consider.

🔐 Security Findings

  • [LOW] index.html - CSV Injection Risk: The CSV export function exportResults uses basic double-quote escaping (replaceAll('"', '""')) but does not explicitly sanitize against potential CSV injection attacks. While the data is client-side and already displayed, a malicious entry in the orgs data could lead to formula execution if the exported CSV is opened in a spreadsheet program by an unsuspecting user.
    • Recommendation: Enhance the escape function in exportResults to prepend a single quote to any field value that starts with a character known to trigger formula parsing in spreadsheet applications (e.g., =, +, -, @, |, %).

🧹 Code Quality

  • index.html - Undefined Function githubUrlFromValue: The exportResults function calls githubUrlFromValue(org.github) but this function is not defined within the provided diff. Ensure this helper function is correctly defined and accessible.
  • index.html - Redundant Dropdown Closing Logic: The logic for closing the export dropdown (setting hidden class, aria-expanded, and chevron.textContent) is duplicated across toggleExportDropdown, the document.addEventListener('click', ...) for outside clicks, and updateExportButtonState. Consider centralizing this logic into a single helper function to improve maintainability and prevent inconsistencies.
  • index.html - Global Variable Dependency: The exportResults function relies on the global filteredOrgs variable. While common in single-file JavaScript, for improved maintainability and testability, it's generally better to pass necessary data as arguments or encapsulate logic within modules/classes.

✅ What's Done Well

  • Accessibility Improvements: The PR significantly improves accessibility by adding appropriate ARIA attributes (aria-label, aria-expanded, aria-haspopup, role="alert", aria-live="assertive") to interactive elements and the toast notification.
  • Robust Client-Side Export: The implementation correctly handles different export formats (CSV, JSON), gracefully manages empty datasets, and uses standard browser APIs for file downloads, ensuring a smooth user experience.
  • Clear UI/UX: The new export dropdown is well-integrated into the existing UI, and the toast notification provides helpful feedback to the user.

📝 Overall Verdict

REQUEST CHANGES - Address the CSV injection risk and minor code quality issues for improved robustness and maintainability.


Review powered by TENET Agent 🛡️ | Triggered automatically on PR #1883

@sonarqubecloud

sonarqubecloud Bot commented Aug 8, 2026

Copy link
Copy Markdown

@ida-jemi

ida-jemi commented Aug 8, 2026

Copy link
Copy Markdown
Author

Hi @S3DFX-CYBER,

Thanks for the thorough review!

  • Closes feat: Add "Export Filtered Results" - Download Current Org List as CSV / JSON #1746 is now in the PR description.
  • githubUrlFromValue() - confirmed, it's defined in the same top-level inline <script> block as exportResults() (no module scoping), so it's in scope and callable directly. Now used for both the CSV and JSON GitHub links instead of the raw string-prefix approach.
  • downloadFile() / toast - agreed, kept as-is.
  • The unrelated accessibility fixes (search input, resume upload label, org picker search, and the pwAutosaveToggle label restructuring) are small and low-risk, so I've left them bundled here rather than splitting into a separate PR, happy to split them out if you'd prefer that for review clarity, just let me know.
  • role="menu"/role="menuitem" - same issue as fix(a11y): add keyboard navigation and ARIA labels to filter controls #2053. Since this is a plain two-item click dropdown with no arrow-key/
    roving-tabindex navigation, I removed the ARIA roles entirely and I'm relying on native <button> semantics instead, aria-haspopup/ aria-expanded/aria-controls on the trigger button already convey the relationship. (I first tried role="group", but SonarCloud flagged that too, preferring a semantic element like <fieldset> over a generic group role, none of which fit a menu-style dropdown, so "no explicit roles" ended up being the right call for both tools.)

Also merged in latest main to resolve the conflict from the mobile filter dropdown redesign, should be up to date now.

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

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

Requires human review: Auto-approval blocked by 11 unresolved issues from previous reviews.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

feat: Add "Export Filtered Results" - Download Current Org List as CSV / JSON

4 participants