Skip to content

feat: add code file extensions - #67

Open
Digvijay557 wants to merge 2 commits into
Phantom-VK:mainfrom
Digvijay557:Digvijay557/feat/add-code-extensions
Open

Digvijay557 wants to merge 2 commits into
Phantom-VK:mainfrom
Digvijay557:Digvijay557/feat/add-code-extensions

Conversation

@Digvijay557

Copy link
Copy Markdown

Summary

Adds support for additional code, markup, configuration, and shell-script file extensions across NoRefund.

This includes JavaScript, TypeScript, Java, C/C++, Go, Rust, HTML, CSS, YAML, TOML, XML, SQL, and shell-script extensions.

Why

This addresses #57 by expanding NoRefund's supported file extensions beyond the previously supported formats.

The new extensions are added to the relevant backend, frontend, and file-picker extension handling so these files can be selected and analyzed like the existing supported formats.

Changes

  • Added support for:
    • .js
    • .ts
    • .tsx
    • .jsx
    • .go
    • .rs
    • .java
    • .c
    • .cpp
    • .h
    • .hpp
    • .html
    • .css
    • .yaml
    • .yml
    • .toml
    • .xml
    • .sql
    • .sh
    • .bash
  • Updated backend supported extensions.
  • Updated frontend supported extensions.
  • Updated coverage for the desktop file-picker extension filter.
  • Added/updated tests for the newly supported extensions.

Testing

  • pytest passes
  • npm test passes (frontend changes)
  • ruff check src/ is clean
  • Verified manually in a running dev build (UI changes)
  • Added/updated a test covering this change

Test results

  • pytest268 passed, 1 skipped
  • npm test110 tests passed
  • ruff check src/All checks passed
  • Manually verified analysis of the newly supported file extensions in the running application.

Screenshots

Screenshot 2026-09-06 142214

File picker and supported files

The application was manually tested with the newly supported code and configuration file extensions.

Analysis results

Multiple newly supported files were successfully analyzed and appeared in the results table.

Test files

Manual verification included JavaScript, TypeScript, Java, C/C++, Go, Rust, HTML, CSS, YAML, TOML, XML, SQL, and shell-script files.

Checklist

  • No internal planning/handoff/session-notes files referenced or included
  • Bridge changes: frontend/src/lib/types.ts updated to match any changed core/ dataclass fields

Issue

Closes #57

Comment thread src/norefund/core/service.py Outdated
@Digvijay557

Copy link
Copy Markdown
Author

Thanks for the review! I’ve addressed all the requested changes:

  • Removed the duplicate _SUPPORTED set from service.py and reused SUPPORTED_EXTENSIONS from parsing.py.

  • Tightened the .js assertion. I used *.js; because the file-picker pattern is semicolon-delimited. This ensures the assertion matches the .js entry specifically rather than the *.js substring inside *.json. I didn't use pattern.split() because the extensions are separated by semicolons rather than whitespace.

  • Restored the existing .pdf, .pptx, .docx, and .txt coverage while keeping the new extension coverage.

Targeted tests pass: 35 passed.

@Phantom-VK Phantom-VK added area:core src/norefund/core — pure logic, no UI area:parsing core/parsing.py — PDF/PPTX/DOCX/TXT extraction type:feat New feature or capability labels Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core src/norefund/core — pure logic, no UI area:parsing core/parsing.py — PDF/PPTX/DOCX/TXT extraction type:feat New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add the missing plain-text code extensions

2 participants