25 Commits

Author SHA1 Message Date
yoshiko 1fc0835f55 Restore localized shell markers and spacing in site (#349)
* Update site language controls

* Polish localized site comments

* fix

* Remove generated timestamp from site manifest
2026-05-10 10:15:25 +00:00
yoshiko 00174335c1 fix: use committed site demo snapshots (#345) 2026-05-10 17:29:05 +09:00
yoshiko 10ec8184dc Add static site data exports and localized revision UI (#344)
* feat(site): add social preview metadata

* feat(site): detect initial language

* copy(site): update hero catch copy

* feat(site): curate demo diff snapshots

* fix(site): serve static image diff blobs

* feat(site): localize demo revision labels

* fix(site): simplify demo revision picker

* fix(site): align revision picker caret

* fix(site): remove revision picker descriptions

* fix(site): localize ai comment diff label
2026-05-10 00:45:00 +09:00
maasa 2d200605f2 fix: keep site export on reachable demo commits 2026-04-30 09:11:26 +09:00
yoshiko 736a94cae9 Add GitHub Pages deployment for the site (#331)
* feat(client): add one-page landing with embedded difit demo

* feat(client): add static snapshot mode for landing

* refactor(site): move landing page files to src/site and swap routes

* build(site): split site entrypoints from core difit build

* fix(site): normalize dev routes and force ipv4 host

* fix(site): use absolute dev entry paths for site pages

* refactor(site): rename app-static route to preview

* misc

* refactor(site): reset landing page to iframe-only scaffold

* feat(site): build pop & edgy landing page

Code the landing page content in SitePage.tsx with English copy.
Design is pop and edgy with gradient text, glow effects, and bold typography.

- Hero section with animated gradient headline + glowing `npx difit` CTA
- Live demo section embedding the existing iframe with browser chrome frame
- 6 feature cards (GitHub-style diffs, comments, AI prompts, PR review, keyboard-first, zero config)
- Usage examples + quick start panel with copy buttons
- Bottom CTA section and footer
- Import global CSS in site/main.tsx for Tailwind utilities
- Add landing-specific CSS (gradient text animation, demo glow)
- Update test to use default import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix

* boxes

* Terminal Design

* hover popup

* feat(site): add preview revision selector

* style(site): fix browser bar and revision spacing

* 調整

* 調整

* 調整

* content(site): refresh features and usage examples from README

* from README

* format

* chore(client): split global styles for app and site

* feat(site): reshape features section into 2x3 terminal panes

* feat(site): wrap features section with single bordered terminal panel

* feat(site): add divider lines to features terminal panel grid

* feat(site): remove separators above 4th and 5th feature panes

* style(site): refine feature panes terminal layout

* style(site): keep features box and remove section separators

* style(site): add centered features window header

* feat(site): add in-place multilingual landing copy

* refactor(site): extract landing page i18n definitions

* style(site): match features border color with dividers

* style(site): make features header terminal-tab style

* feat(site): switch features section to interactive tabs

* style(site): use max-width for features viewport sizing

* fix(site): disable open-in-editor in static snapshots

* feat(site): add skills install section

* style(site): refine skills install callout

* fix site preview data export

* add site revision quick menu

* use curated site demo diffs

* refine site demo diff selection

* support github pages site build

* add github pages deployment workflow

* remove site demo comment bubble

* simplify site build script

* fix: fetch full history for site deploy

* fix: serve static preview blobs

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 23:59:41 +00:00
yoshiko 9e2643cfda Refactor dev startup logging and hide internal server output (#257)
* fix(dev): print shutdown review comments

* refactor(dev): only hide internal server url

* fix(dev): declare stdout proxy types

* fix(dev): hide internal port retry logs

* refactor(dev): hide nested script banners

* style(dev): use rocket banner for vite startup

* fix(dev): disable vite clear screen

* fix(dev): preserve repeated startup log lines

* fix(dev): keep ctrl-c during compile as clean exit

* refactor(dev): move pnpm dev helpers into dev dir

* rm dev message

* fix(hooks): run checks for scripts changes
2026-03-19 09:33:49 +09:00
yoshiko 933875d1a8 fix(ci): stabilize keyboard benchmark (#256)
Use a deterministic shared diff, discard warm-up iterations, and balance run order across two rounds before comparing merged results.
2026-03-18 23:20:41 +09:00
maasa 922dba4a69 fix(dev): keep vite attached to active difit server 2026-03-14 16:29:13 +09:00
maasa 810bded7ed fix(dev): show only Vite URL in dev logs 2026-02-25 23:12:23 +09:00
maasa 62fbb9fc2b remove prettier experimentalTernaries 2026-02-20 11:36:43 +09:00
maasa 10dccdcbb5 refactor(dev): delegate stdin and arg parsing to cli 2026-02-16 22:54:37 +09:00
maasa 1f92f621d4 fix: remove shell mode from dev spawns 2026-02-13 14:16:49 +09:00
maasa 9385eb0b05 format: trailingComma: all 2026-01-31 10:13:43 +09:00
maasa 987d93bd39 chore(dev): use mri for dev script args 2025-09-17 17:47:57 +09:00
Eric McDonald e1e15f21b1 fix: make --clean flag properly reset viewed files counter (#92)
The --clean flag was only clearing comments but not resetting the viewed
files counter. This fix addresses two issues:

1. App.tsx now calls clearViewedFiles() when --clean flag is detected
2. scripts/dev.js now properly passes through --clean flag to CLI

Fixes #91

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Eric McDonald <emcd@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-17 17:17:21 +09:00
Noritaka Kobayashi 1a105de150 refactor: Remove unused imports and variables in generate-large-diff.js (#77) 2025-08-02 17:23:18 +09:00
haya14busa 607f6d9a81 perf: Improve keyboard navigation performance with React.memo (#72)
* Add script to generate large diffs for performance testing

This script generates synthetic diff files of various sizes (small, medium,
large, xlarge) to help test and improve keyboard navigation performance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add performance measurement script focused on keyboard navigation

- Created measure-performance.js script for tracking navigation performance
- Added npm scripts for easy testing (perf, perf:small, perf:medium, etc.)
- Captures detailed metrics including git commit info and operation timings
- Baseline measurements show significant slowdown with larger diffs:
  - Small (500 lines): ~65ms per navigation
  - Medium (10,000 lines): ~480-500ms per navigation (7.5x slower)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: Add performance-results to .gitignore

Performance test results should not be tracked in version control
as they are machine-specific and regenerated for each test run.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Improve performance measurement script

- Fix keyboard shortcuts: use ] and [ for file navigation instead of f/F
- Fail fast when selectors are not found to avoid invalid measurements
- Reduce default iterations from 3 to 2 (configurable with --iterations)
- Remove unused measurement types to simplify the script
- Better error handling for page load failures

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: Remove memory measurement from performance script

Memory performance API is not available in headless Chrome by default,
so removing it to simplify the script and avoid confusion.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add git working directory dirty state detection to performance script

Track whether there are uncommitted changes when running performance tests
to ensure reproducibility. Shows a warning when the working directory has
uncommitted changes during measurement.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add performance comparison script

Create a script to compare two performance measurement results and display
the differences in a clear, readable format. Supports both Markdown and JSON
output formats.

Features:
- Compare average operation times and identify improvements/regressions
- Support for automatic detection of latest results by size
- Markdown table output with color-coded changes
- JSON output for programmatic processing
- Ability to save comparison results to file

Usage:
- pnpm compare:perf - Compare latest two medium results
- pnpm compare:perf small - Compare latest two small results
- pnpm compare:perf file1.json file2.json - Compare specific files
- pnpm compare:perf small --json - Output as JSON
- pnpm compare:perf small --save - Save markdown to file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Improve performance comparison script with better UX

- Change npm script from compare:perf to perf:compare for consistency
- Use --size flag instead of positional argument for better clarity
- Simplify output to focus on overall performance metrics
- Improve table formatting for better readability
- Fix argument parsing to properly handle flag values

The comparison now shows a clean summary with performance change
percentage and visual indicators for improvements/regressions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Fix argument parsing in performance measurement script

The --headed flag was not working because it was being treated as the
size parameter. Fixed by properly filtering out flags and their values
when determining the positional size argument.

Now supports:
- pnpm perf --headed (uses default medium size)
- pnpm perf:small --headed
- pnpm perf large --headed --iterations 1

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Use --size flag for performance measurement script

Changed the performance measurement script to only accept size via
the --size flag, removing support for positional arguments. This
makes it consistent with the comparison script.

- Size must now be specified with --size flag
- Shows helpful error message when positional arguments are used
- Updated all npm scripts to use --size flag
- Added usage information when invalid size is provided

Usage:
  pnpm perf --size small --headed --iterations 1
  pnpm perf:small --headed
  pnpm perf --size medium (default)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* perf: Improve performance measurement timing accuracy

- Use setTimeout(0) before requestAnimationFrame to allow React's concurrent features to complete
- This provides more accurate measurement of actual navigation performance
- Add experimental test scripts to .gitignore

* perf: Optimize PrismSyntaxHighlighter to prevent re-renders

Add React.memo to both PrismSyntaxHighlighter and EnhancedPrismSyntaxHighlighter
components to prevent unnecessary re-renders during keyboard navigation.

Performance improvement:
- Baseline: 474.05ms average navigation time
- Optimized: 86.67ms average navigation time
- Result: 81.7% reduction in keyboard navigation latency

The optimization is particularly effective for large diffs with many syntax
highlighted code blocks, as it prevents re-rendering of unchanged code when
parent components update during navigation.

Also added useCallback for render functions to ensure proper memoization.

* feat: Add GitHub Actions workflow for performance testing

- Run performance tests on PRs comparing base vs head branches
- Show results in Job Summary and PR comments
- Fail the workflow if performance degrades by more than 10%
- Mark as improved if performance increases by more than 5%
- Handle cases where performance scripts don't exist in base branch

* feat: Add playwright as dev dependency and improve CI workflow

- Add playwright as a dev dependency in package.json
- Update GitHub Actions workflow to use the compare script properly
- Use JSON output from compare script for accurate data extraction
- Properly handle both compare and compare-fallback outputs in Job Summary

* refactor: Improve CI workflow to use head branch scripts consistently

- Setup Node.js and pnpm first before any checkouts
- Use head branch's measurement scripts to test both head and base builds
- This ensures consistent measurement methodology across versions
- Better handling of cases where base branch might have incompatible changes
- Add number formatting for cleaner display in Job Summary and PR comments

* fix: Install playwright in base branch if missing during CI

- Check if playwright is installed before running performance tests
- Install it temporarily with --no-save if missing
- This ensures tests can run even when base branch doesn't have playwright as a dependency

* fix: Use pnpm to install playwright in CI to handle workspace protocols

- Switch from npm to pnpm for installing playwright in base branch
- Fallback to npm if pnpm fails (for older versions)
- This fixes the 'Unsupported URL Type "link:"' error when base branch uses pnpm workspaces

* fix: Use pnpm exec instead of npx and remove npm fallback

- Use 'pnpm exec' instead of 'npx' for consistency
- Remove unnecessary npm fallback since we're already using pnpm
- Simplify the playwright installation logic

* ci: Remove PR comment functionality from performance workflow

Removed PR comment functionality from the GitHub Actions performance
workflow since it won't work from forks due to permission restrictions.
The workflow now only reports results to the Job Summary, which is
accessible to all users regardless of fork status.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Fix performance test result path in CI workflow

The performance test was creating results in the head directory even
when running from the base directory. Changed working-directory to
base to ensure results are created in the correct location.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Simplify performance workflow to use compare script output directly

- Removed redundant baseline handling since head scripts always work
- Use compare script's markdown output directly for GitHub Step Summary
- Removed unnecessary file copying between directories
- Simplified JSON extraction for status checks only
- Use direct node execution instead of pnpm to avoid extra output

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove ANSI color codes and fix variable references in compare script

- Removed ANSI color codes to prevent formatting issues in GitHub Actions
- Fixed undefined iterations error by using correct variable names (current vs compared)
- Simplified logging to use console.error for non-output messages
- Made output cleaner for CI/CD environments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add --difit-path option to performance measurement script

Added ability to specify a custom difit binary path in the performance
measurement script. This allows the CI workflow to properly test the
base branch's build instead of always using the head branch's difit.

- Added --difit-path parameter to measure-performance.js
- Updated CI workflow to use base branch's difit build for base measurement
- Now properly compares performance between different code versions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: Remove redundant playwright installation steps

Removed automatic playwright installation from both the CI workflow
and measure-performance.js since playwright is now a dev dependency
and will be installed via pnpm install.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add Playwright browser caching to CI workflow

- Re-added playwright install step as browser binaries must be downloaded separately
- Added caching for Playwright browsers to speed up CI runs
- Cache key is based on Playwright version to ensure compatibility

Browser binaries cannot be bundled in npm packages due to their size
(~100-300MB) and platform-specific nature, so they must be installed
separately.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: Add stdin support to dev.js script

Modified dev.js to support reading diffs from stdin, matching the
functionality already available in the main CLI. This allows developers
to pipe diffs directly into the dev server.

Usage examples:
- git diff | pnpm dev
- git diff | node scripts/dev.js -
- cat some.patch | pnpm dev

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-29 09:58:07 +09:00
haya14busa 01d02c342a fix: use pnpm to execute vite, support two commitish arguments, and fix hanging on browser close (#65)
- Use pnpm exec to run vite instead of calling it directly since the project uses pnpm
- Support passing two commitish arguments to difit CLI (e.g., pnpm dev HEAD~2 HEAD)
- Fix script hanging when browser tab is closed by properly terminating vite process when CLI exits

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-27 19:33:50 +09:00
yoshiko 1f5d010276 Rename to difit (#33)
* reviewit -> difit

* Difit -> difit

* Replace images
2025-07-09 12:11:07 +09:00
no-yan dd5e6d1b09 Add untracked file detection with CLI prompt (#6)
* Add untracked file detection with CLI prompt

- Add checkUntrackedFiles() function to detect untracked files when viewing working directory changes (commitish = '.')
- Prompt user to add files with --intent-to-add to include them in diff
- Only activates for working directory diffs, not commit comparisons
- Uses simple-git and readline for Git operations and user interaction

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor CLI logic: Extract untracked files handling into separate functions

Extracted handling of untracked files into dedicated functions (handleUntrackedFiles, promptUserToIncludeUntracked) for improved readability.

Moved shared logic (findUntrackedFiles, markFilesIntentToAdd, promptUser) to utils.ts.

Replaced manual readline handling with readline/promises API for cleaner asynchronous prompting.

* Support checking  untracked files in tui mode

* Improve dev script: Add constants, process cleanup, and documentation

- Extract CLI_SERVER_READY_MESSAGE constant for maintainability
- Fix resource leak by tracking and killing Vite process on shutdown
- Add comments explaining stdout piping rationale and design decisions
- Improve graceful shutdown handling for both CLI and Vite processes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* merge main

* Fix git reset command suggestion for untracked files

Change from 'git reset --mixed' to 'git reset -- <files>' to specifically
unstage only the intent-to-add files rather than all staged changes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: improve comment writing

* chore: remove unused function

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-02 22:21:10 +09:00
maasa 23d4967e7d udpate release slash command 2025-07-02 08:37:43 +09:00
maasa 61cf3a648d refactor: simplify dev script without concurrently dependency
- Replace concurrently with native Node.js spawn and setTimeout
- Start CLI server first, then Vite after 1 second delay
- Add proper shutdown handling and error logging
- Remove need for external concurrently dependency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29 23:40:15 +09:00
maasa 59c7d47323 feat: allow passing commit-ish argument to dev script
- Add scripts/dev.js to handle dynamic commit-ish arguments
- Update dev script to use node script instead of hardcoded HEAD
- Support 'pnpm run dev <commit-ish>' syntax
- Update README with usage examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29 23:34:48 +09:00
maasa 88c7e34892 remove commit.sh 2025-06-29 22:13:32 +09:00
maasa 3779d0924b feat: 自動コミットスクリプトを追加
- scripts/commit.sh を作成し、実行権限を付与
- package.json に npm run commit スクリプトを追加
- Claude Code署名付きで自動コミット可能に

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29 21:02:37 +09:00