| Age | Commit message (Collapse) | Author |
|
Create / Edit / Delete deck modals now write through localDeckRepository
and fire-and-forget syncActionAtom so the change is pushed when the
network is up. EditDeckModal reads its note-type list from the
local-first noteTypesAtom instead of fetching, and the "reconnect to..."
guards on the submit buttons are gone — the user can keep working while
offline.
Soft-delete intentionally does NOT cascade to notes/cards, matching the
server's existing deck.softDelete: the deck disappears from listings and
its children become unreachable that way.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Wipe Dexie databases (main + CRDT sync state) and reset the sync queue
when the user explicitly logs out so the next account on the same device
starts from a clean local store. Session expiry deliberately keeps local
data intact so a returning user finds their offline work waiting.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Pull pure card-generation logic (template rendering and the initial FSRS
state for new cards) out of the server note repository into
src/shared/card-generator.ts so both server and client can call it. The
server's note.create / createMany now delegate the rendering work to the
shared function and only insert the resulting payload, preserving the
existing behavior. Groundwork for offline-first note CRUD on the client.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Switch deckAtom, cardsByDeckAtomFamily, noteTypesAtom, and studyDataAtom
to a stale-while-revalidate pattern: read from IndexedDB synchronously,
trigger sync in the background, and refetch on sync_complete. When local
is empty, await a single bootstrap pull before deciding there's no data.
Add study-builder to assemble StudyCards from LocalCard + Note + NoteType
+ field values, replacing the server /study endpoint dependency. The
study session can now run end-to-end offline.
Disable submit on all write modals when offline since writes still
require the server. Add a "Showing cached data" hint to the sync status
indicator. Drop cacheStudyCards (cards arrive via regular sync pull now)
and update page tests to reflect that lists no longer refresh by hitting
the GET API.
|
|
Move FSRS scheduling to a shared module so the client can compute next
card state without contacting the server. StudyPage now writes the
updated card and review log straight to IndexedDB and lets the existing
sync engine push them on reconnect, instead of POSTing to
/api/decks/:deckId/study/:cardId. Online sessions still trigger a sync
immediately so server-side aggregates stay fresh; offline sessions
accumulate in pendingCountAtom until the next online tick.
The legacy study POST route is preserved for backwards compatibility.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
|
Move undo button into card action buttons group
|
|
Move the undo button next to the edit button (absolutely positioned
inside the card) so its conditional appearance no longer pushes the
card down.
https://claude.ai/code/session_01DEGwZf6bmzv4X2XTsK95Wk
|
|
Previously when the session expired, the API client cleared tokens but
the UI displayed "Invalid or expired token" instead of redirecting to
the login page. The root cause was that isAuthenticatedAtom was derived
from userAtom only as a re-evaluation trigger, while the actual value
came from apiClient.isAuthenticated(). On page reload userAtom is null,
so setting it to null on session expiry did not trigger a re-render and
ProtectedRoute never redirected.
Make userAtom (persisted via atomWithStorage) the single source of truth
for auth state, derive isAuthenticatedAtom from it, drop the redundant
apiClient.isAuthenticated(), and explicitly navigate to /login on
session expiry. Also trigger session expiry when a 401 comes back with
no refresh token available.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Allow each deck to specify a default note type that is auto-selected
when creating new notes. Includes DB schema migration, server API
updates, sync layer support, and UI for editing the default in the
deck settings modal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
|
|
Display card difficulty for reviewed cards in deck view
|
|
Show per-card difficulty (D: X.X) in the card list alongside existing
metrics (reps, lapses). Hidden for unreviewed cards (difficulty = 0).
https://claude.ai/code/session_019XoFbra6drKrZpHASUzKDq
|
|
|
|
Add totalCardCount and reviewCardCount to deck API responses and
display a progress bar on the home page for each deck with cards.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Vite's define config is not inherited by Vitest, causing App component
tests to fail with ReferenceError.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add pnpm fix (runs fix:lint + fix:format), pnpm fix:lint (biome check
--write), and rename pnpm format to pnpm fix:format for consistency
with the existing check namespace convention.
|
|
Card and StudyCard interfaces used generic number for state, causing
type errors when indexing Record<CardStateType, ...> maps. Also adds
missing FSRS fields to client Card interface to match API response.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Consolidate typecheck and lint into a unified `pnpm check` command
with `check:ts` and `check:lint` sub-commands. Update CI workflow
to use the single check step and update docs accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
The dynamic import was redundant since the module was already statically
imported in the same file, causing a Vite warning.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add newCardCount alongside Total and Due stats in the deck detail view,
queried from cards with state=New via a new countNewCards repository method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
The disabled attribute on the parent button element prevented all child
click events, making the edit button unresponsive on the back side.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Display Learning, Review, and Relearning badges in addition to New,
using consistent color scheme from DeckCardsPage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Inject package.json version via Vite's define config and display
it in a persistent footer across all pages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
Allow editing note content directly from the study screen via a pen
icon button or the E key shortcut. Keyboard shortcuts are disabled
while the edit modal is open to prevent accidental card flips/ratings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Navigation links on the session complete screen were fire-and-forget,
causing the last card's review to not be reflected on the deck list.
Replace links with buttons that await the review flush and invalidate
the deck query cache before navigating.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add my-auto to the deck info container for vertical centering
within the flex row.
|
|
|
|
Allow creating notes directly from the deck detail page without
navigating through View Cards first.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Remove newCardsPerDay limit and simplify card study logic
|
|
REVIEW_CARDS_LIMIT(復習カード80枚制限)とnewCardsPerDay(1日の新規カード制限)
を削除し、期日が来たすべてのカードを制限なく返すように変更。
削除した主な要素:
- REVIEW_CARDS_LIMIT定数とカード取得時のlimitパラメータ
- newCardsPerDayフィールド(DB schema, 型定義, Zod schema, sync, CRDT)
- countDueNewCards, countDueReviewCards, findDueNewCardsForStudy,
findDueReviewCardsForStudy(CardRepository)
- countTodayNewCardReviews(ReviewLogRepository)
- デッキルートからのReviewLogRepository依存
https://claude.ai/code/session_018hrEJ9vg3RPoeAPyEc17gS
|
|
Add CLAUDE.md developer documentation
|
|
https://claude.ai/code/session_013M6WrK2CDSC3JJLnnhio6e
|
|
https://claude.ai/code/session_013M6WrK2CDSC3JJLnnhio6e
|
|
|
|
All cards now use note-based template rendering. The legacy
front/back fallback path is no longer needed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Simplify deck stats to show due card count from server
|
|
Shuffle order is now fixed within a study day by seeding mulberry32
with the study day boundary timestamp (3:00 AM rollover).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Review card limit is reduced from 100 to 80 across deck list, deck detail,
and study routes. Deck detail page now shows only total card count and due
card count (with budget limits applied), matching the deck list and study
screen numbers.
https://claude.ai/code/session_01NAj4waQhwSSXV9EbgioX2j
|
|
|
|
Show a "New" badge in the top-right corner of cards when the card
state is 0 (new), helping users identify cards they haven't seen before.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Show separate counts for New, Learning, and Review cards instead of
a single "Due Today" count. Uses FSRS CardState to categorize cards
with color-coded display (blue/orange/green).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Automatically removes soft-deleted records older than 90 days.
Runs on server startup and every 24 hours thereafter.
Respects foreign key dependencies when deleting.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
The deck list was showing all due cards without applying the
newCardsPerDay limit or review card limit (100), causing a mismatch
with the actual number of cards available in the study screen.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
|