Skip to content

feat: one-click web multi-CSV analysis + CLI/desktop integrations#23

Merged
rad1092 merged 2 commits into
mainfrom
codex/evaluate-current-project-completion-level
Feb 15, 2026
Merged

feat: one-click web multi-CSV analysis + CLI/desktop integrations#23
rad1092 merged 2 commits into
mainfrom
codex/evaluate-current-project-completion-level

Conversation

@rad1092
Copy link
Copy Markdown
Owner

@rad1092 rad1092 commented Feb 15, 2026

Motivation

  • Move the web dashboard beyond JSON-paste mode by providing a one-click multi-CSV analysis flow that accepts multiple uploaded CSVs and runs the integrated multi-file analyzer server-side.
  • Provide deterministic per-request behavior by disabling cache for web-triggered multi-analysis and make --no-cache behavior testable from the CLI.
  • Add basic desktop launcher and environment diagnostics to improve local UX and document realistic progress in README.

Description

  • Added a new web API POST /api/multi-analyze that writes uploaded CSV texts to a temporary directory and calls analyze_multiple_csv(..., use_cache=False) (file: bitnet_tools/web.py).
  • Implemented one-click web UI changes to accept multiple CSV files, optional group_column/target_column inputs, a run button that calls /api/multi-analyze, and automatic dashboard JSON population and rendering (files: bitnet_tools/ui/index.html, bitnet_tools/ui/app.js, bitnet_tools/ui/styles.css).
  • Introduced a comprehensive multi-file analysis module with streaming profiling, caching helpers, schema drift detection, insights, JSON/report builders and pandas example guidance (file: bitnet_tools/multi_csv.py).
  • Added visualization helpers to generate charts per-file (bitnet_tools/visualize.py) and hooked optional chart generation into CLI multi-analyze with error fallback.
  • Extended CLI (bitnet_tools/cli.py) with multi-analyze, report, desktop, and doctor subcommands, --no-cache flag passthrough, chart output support, and markdown report generation using new helpers (build_multi_csv_markdown, build_markdown_report).
  • Improved analysis.py streaming summarizer to avoid loading all rows into memory and added build_markdown_report for single-file reports.
  • Added a Windows desktop launcher GUI (bitnet_tools/desktop.py, bitnet_desktop.pyw) and an environment diagnostic helper (bitnet_tools/doctor.py).
  • Updated README.md to recalibrate the reported completion from ~98% to ~92%, documented the new web/desktop flows, and added a console script entry bitnet-desktop in pyproject.toml.
  • Added and updated automated tests to cover the new CLI modes and multi-file analysis behaviors (files: tests/test_analysis.py, tests/test_cli.py).

Testing

  • Ran unit/integration tests with pytest -q and all tests passed: 19 passed.
  • Exercised the web UI by launching the local server and running an automated Playwright script that rendered the dashboard and produced screenshot artifacts, which completed successfully.

Codex Task

@rad1092 rad1092 merged commit 79d1b21 into main Feb 15, 2026
4 checks passed
@rad1092 rad1092 deleted the codex/evaluate-current-project-completion-level branch February 15, 2026 00:16
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ed41be031c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bitnet_tools/web.py
Comment on lines +100 to +101
path = Path(td) / name
path.write_text(text, encoding="utf-8")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restrict upload paths to the temporary directory

/api/multi-analyze trusts the client-provided name and writes directly to Path(td) / name, so a crafted filename like ../../tmp/pwn.csv or an absolute path escapes the temp dir and allows overwriting arbitrary writable files on the host before analysis runs. This is a server-side file write primitive reachable by any caller of the endpoint; sanitize to a basename (or generate server-side names) and verify the resolved path stays under td before calling write_text.

Useful? React with 👍 / 👎.

Comment thread bitnet_tools/web.py
for i, f in enumerate(files):
if not isinstance(f, dict):
continue
name = str(f.get("name", f"file_{i}.csv"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ensure each uploaded CSV gets a unique temp filename

This code reuses the incoming name as the on-disk filename, so if two uploaded entries share a basename (for example two different data.csv files), the later write overwrites the earlier one and both analysis slots end up reading the same content. The request still succeeds, but the multi-file comparison is silently corrupted; append an index/UUID to each temp filename to preserve one file per upload item.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant