Skip to content

test: add regression tests for v0.3.4/v0.3.5 bug fixes - #12

Merged
dahai80 merged 1 commit into
mainfrom
test/regression-v0.3.4-v0.3.5
Jul 28, 2026
Merged

dahai80 merged 1 commit into
mainfrom
test/regression-v0.3.4-v0.3.5

Conversation

@dahai80

@dahai80 dahai80 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #11

Adds test coverage for the 3 bugs fixed in v0.3.4 and v0.3.5.

New test files

File Tests Coverage
tests/utils/tool.test.ts 6 buildTool renderToolUseMessage 0-2 arg calls, custom impl, TOOL_DEFAULTS spread
tests/hooks/hook-specific-output.test.ts 8 hookSpecificOutput null guard (v0.3.5 SessionEnd crash)
tests/components/PromptInput/mode-hint-visibility.test.ts 8 shouldShowModeHint logic (v0.3.4 mode hint overlap)

Result

22 pass, 0 fail, 32 expect() calls
Ran 22 tests across 3 files. [145ms]

🤖 Generated with Claude Code

- tests/utils/tool.test.ts: 6 tests for buildTool renderToolUseMessage
  0-2 arg calls, custom implementation, TOOL_DEFAULTS spread
- tests/hooks/hook-specific-output.test.ts: 8 tests for hookSpecificOutput
  null guard (v0.3.5 SessionEnd crash regression)
- tests/components/PromptInput/mode-hint-visibility.test.ts: 8 tests for
  shouldShowModeHint logic (v0.3.4 mode hint overlap regression)

Closes #11

Co-Authored-By: Claude <[email protected]>
@dahai80
dahai80 merged commit 72bd6de into main Jul 28, 2026
1 check passed
@dahai80
dahai80 deleted the test/regression-v0.3.4-v0.3.5 branch July 28, 2026 09:31
dahai80 added a commit that referenced this pull request Jul 30, 2026
….4.1) (#16)

- Add WebSocket /ws/chat to projectApiServer for streaming chat
  (subprocess mode: fusion-code --output-format=stream-json)
- Protocol: chat.stream/chat.cancel → chat_event/chat_done NDJSON
  (compatible with StreamingBridge)
- Add start.sh for UpstreamServiceManager auto-start
- Update README with WS endpoint docs
- Bump version to 0.4.1

Fusion-Studio issues filed:
- #9 Layer 1: upstream service registration
- #10 Layer 2: FusionCodeAPIClient
- #11 Layer 3: StreamingBridge WS integration
- PR #12: Layer 1+2 implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)
dahai80 added a commit that referenced this pull request Jul 31, 2026
….4.1)

- Add WebSocket /ws/chat to projectApiServer for streaming chat
  (subprocess mode: fusion-code --output-format=stream-json)
- Protocol: chat.stream/chat.cancel → chat_event/chat_done NDJSON
  (compatible with StreamingBridge)
- Add start.sh for UpstreamServiceManager auto-start
- Update README with WS endpoint docs
- Bump version to 0.4.1

Fusion-Studio issues filed:
- #9 Layer 1: upstream service registration
- #10 Layer 2: FusionCodeAPIClient
- #11 Layer 3: StreamingBridge WS integration
- PR #12: Layer 1+2 implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)
dahai80 added a commit that referenced this pull request Aug 28, 2026
…split slice #12) (#182)

audit 1.1.1 god-module split. Extract the restoreReadFileState useCallback
body from REPL.tsx into a pure helper src/utils/readFileStateRestore.ts.
No React, no JSX, no hooks; only side effect mutates the two passed-in refs
(readFileState.current = mergeFileStateCaches, bashTools.current.add),
matching the original deps=[] useCallback verbatim. REPL keeps a thin
useCallback wrapper (deps unchanged); downstream reads the same const name
-> byte-identical. Two now-unused imports dropped (mergeFileStateCaches,
extractBashToolsFromMessages).

Tests: src/__tests__/utils/readFileStateRestore.test.ts (5 cases) assert
bashTools accumulation, cross-call Set union, readFileState.current ref
reassignment (merge returns clone), non-bash skip, non-string-command skip.

Gates: typecheck 0 / 847 tests / lint clean new files / build:dev 3769 modules.
REPL 6538 -> 6529 (-9 LOC; -567 cumulative off 7096 baseline).

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add regression tests for v0.3.4/v0.3.5 bug fixes

1 participant