mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-01 06:12:07 -07:00
fix: allow missing git in yomitan build; clean up README formatting
- Guard `getSourceState()` with `SUBMINER_YOMITAN_ALLOW_MISSING_GIT=1` escape hatch for environments without a git submodule - Fix README requirements table column alignment and remove stray horizontal rule - Update task-268 with follow-up CodeRabbit round notes and final summary
This commit is contained in:
12
README.md
12
README.md
@@ -108,12 +108,12 @@ Browse sibling episode files and the active mpv queue in one overlay modal. Open
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
| | Required | Optional |
|
| | Required | Optional |
|
||||||
| -------------- | --------------------------------------- | -------------------------------------- |
|
| -------------- | --------------------------------------- | ---------------------------------------------------------- |
|
||||||
| **Player** | [`mpv`](https://mpv.io) with IPC socket | — |
|
| **Player** | [`mpv`](https://mpv.io) with IPC socket | — |
|
||||||
| **Processing** | `ffmpeg`, `mecab` + `mecab-ipadic` | `guessit` (AniSkip), `alass` / `ffsubsync` (subtitle sync) |
|
| **Processing** | `ffmpeg`, `mecab` + `mecab-ipadic` | `guessit` (AniSkip), `alass` / `ffsubsync` (subtitle sync) |
|
||||||
| **Media** | — | `yt-dlp`, `chafa`, `ffmpegthumbnailer` |
|
| **Media** | — | `yt-dlp`, `chafa`, `ffmpegthumbnailer` |
|
||||||
| **Selection** | — | `fzf` / `rofi` |
|
| **Selection** | — | `fzf` / `rofi` |
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> [`bun`](https://bun.sh) is required if building from source or using the CLI wrapper: `subminer`. Pre-built releases (AppImage, DMG, installer) do not require it.
|
> [`bun`](https://bun.sh) is required if building from source or using the CLI wrapper: `subminer`. Pre-built releases (AppImage, DMG, installer) do not require it.
|
||||||
@@ -236,8 +236,6 @@ subminer stats -b # stats daemon in background
|
|||||||
subminer stats -s # stop background stats daemon
|
subminer stats -s # stop background stats daemon
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Full guides on configuration, Anki setup, Jellyfin, immersion tracking, and more: **[docs.subminer.moe](https://docs.subminer.moe)**
|
Full guides on configuration, Anki setup, Jellyfin, immersion tracking, and more: **[docs.subminer.moe](https://docs.subminer.moe)**
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: 'Address CodeRabbit review action items for PR #38'
|
|||||||
status: Done
|
status: Done
|
||||||
assignee: []
|
assignee: []
|
||||||
created_date: '2026-04-01 05:35'
|
created_date: '2026-04-01 05:35'
|
||||||
updated_date: '2026-04-01 05:40'
|
updated_date: '2026-04-01 06:07'
|
||||||
labels:
|
labels:
|
||||||
- pr-review
|
- pr-review
|
||||||
- coderabbit
|
- coderabbit
|
||||||
@@ -27,8 +27,18 @@ Review unresolved CodeRabbit feedback on PR #38 and implement the actionable fix
|
|||||||
- [x] #3 Relevant local verification for the affected areas passes.
|
- [x] #3 Relevant local verification for the affected areas passes.
|
||||||
<!-- AC:END -->
|
<!-- AC:END -->
|
||||||
|
|
||||||
|
## Implementation Notes
|
||||||
|
|
||||||
|
<!-- SECTION:NOTES:BEGIN -->
|
||||||
|
2026-04-01: Reopened for follow-up CodeRabbit round after commit 233bde58. Remaining actionable items: guard maxMatches <= 0 in duplicate exact-match helper and strengthen the duplicate tracking test fixture to prove deduplication as well as sorting.
|
||||||
|
|
||||||
|
2026-04-01: Follow-up round addressed locally. Added guard for maxMatches <= 0 in duplicate exact-match scanning and strengthened the pre-add duplicate tracking test fixture to prove deduplication as well as sorting.
|
||||||
|
<!-- SECTION:NOTES:END -->
|
||||||
|
|
||||||
## Final Summary
|
## Final Summary
|
||||||
|
|
||||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||||
Addressed all unresolved actionable CodeRabbit comments on PR #38. Fixed duplicate tracking so empty duplicate lists are not persisted after sentence-card creation, sanitized Yomitan add-note noteId values to accept only positive integers, preserved paused playback for configured subtitle-seek keybindings when pause state is unknown, and short-circuited duplicate exact-match scanning for single-result lookups. Added regression tests for each case and verified with `bun test` on the affected suites plus `bun run typecheck`, `bun run test:fast`, `bun run test:env`, `bun run build`, and `bun run test:smoke:dist`.
|
Addressed all unresolved actionable CodeRabbit comments on PR #38. Fixed duplicate tracking so empty duplicate lists are not persisted after sentence-card creation, sanitized Yomitan add-note noteId values to accept only positive integers, preserved paused playback for configured subtitle-seek keybindings when pause state is unknown, and short-circuited duplicate exact-match scanning for single-result lookups. Added regression tests for each case and verified with `bun test` on the affected suites plus `bun run typecheck`, `bun run test:fast`, `bun run test:env`, `bun run build`, and `bun run test:smoke:dist`.
|
||||||
|
|
||||||
|
Follow-up CodeRabbit round addressed locally: `findExactDuplicateNoteIds()` now returns early when `maxMatches <= 0`, and the sentence-card duplicate tracking regression test now uses a repeated duplicate ID to assert deduplication plus sorting. Re-verified with targeted duplicate/card tests, `bun run typecheck`, and `bun run test:fast`.
|
||||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||||
|
|||||||
@@ -51,9 +51,16 @@ function ensureSubmodulePresent() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getSourceState() {
|
function getSourceState() {
|
||||||
const revision = readCommand('git', ['rev-parse', 'HEAD'], submoduleDir);
|
try {
|
||||||
const dirty = readCommand('git', ['status', '--short', '--untracked-files=no'], submoduleDir);
|
const revision = readCommand('git', ['rev-parse', 'HEAD'], submoduleDir);
|
||||||
return { revision, dirty };
|
const dirty = readCommand('git', ['status', '--short', '--untracked-files=no'], submoduleDir);
|
||||||
|
return { revision, dirty };
|
||||||
|
} catch (error) {
|
||||||
|
if (process.env.SUBMINER_YOMITAN_ALLOW_MISSING_GIT === '1') {
|
||||||
|
return { revision: 'unknown', dirty: '' };
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isBuildCurrent(force) {
|
function isBuildCurrent(force) {
|
||||||
|
|||||||
Reference in New Issue
Block a user