mudancinhas
All checks were successful
Mindforge API Build and Deploy / Build Mindforge API Image (push) Successful in 2m12s
Mindforge API Build and Deploy / Deploy Mindforge API (internal) (push) Successful in 8s
Mindforge Web Build and Deploy (internal) / Build Mindforge Web Image (push) Successful in 3m41s
Mindforge Web Build and Deploy (internal) / Deploy Mindforge Web (internal) (push) Successful in 8s

This commit is contained in:
2026-06-11 20:26:08 -03:00
parent b29ae991c8
commit 21186c9270
13 changed files with 927 additions and 82 deletions

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="pt-BR">
<head>
<meta charset="UTF-8" />

View File

@@ -8,7 +8,6 @@
"name": "mindforge-web",
"version": "0.0.0",
"dependencies": {
"@types/marked": "^5.0.2",
"diff": "^8.0.3",
"marked": "^17.0.4",
"preact": "^10.29.0"
@@ -849,12 +848,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/marked": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@types/marked/-/marked-5.0.2.tgz",
"integrity": "sha512-OucS4KMHhFzhz27KxmWg7J+kIYqyqoW5kdIEI319hqARQQUTqhao3M/F+uFnDXD0Rg72iDDZxZNxq5gvctmLlg==",
"license": "MIT"
},
"node_modules/@types/node": {
"version": "24.12.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.0.tgz",

View File

@@ -9,7 +9,6 @@
"preview": "vite preview"
},
"dependencies": {
"@types/marked": "^5.0.2",
"diff": "^8.0.3",
"marked": "^17.0.4",
"preact": "^10.29.0"

View File

@@ -313,49 +313,6 @@ export function SpacedReviewComponent() {
}
};
const startSession = async () => {
if (selectedStatuses.length === 0) {
setError('Selecione ao menos um status para iniciar a revisao.');
return;
}
if (selectedLibraryIds.length === 0) {
setError('Selecione ao menos um arquivo para iniciar a revisao.');
return;
}
if (selectedRagLibraries.length === 0) {
setError('Nenhum arquivo encontrado com os filtros atuais. Ajuste os status ou os arquivos selecionados.');
return;
}
setStartingSession(true);
setError(null);
try {
const ragByLibraryId = new Map(selectedRagLibraries.map((library) => [library.libraryId, library]));
const libraryIds = Array.from(new Set(selectedRagLibraries.map((library) => library.libraryId)));
const response = await MindforgeApiService.createFlashcardReviewSession({ libraryIds });
const allowedLibraryIds = new Set(libraryIds);
const filteredCards = response.cards.filter((card) => allowedLibraryIds.has(card.libraryId));
const orderedCards = orderCardsForSession(filteredCards, ragByLibraryId);
if (orderedCards.length === 0) {
setError('Os filtros selecionados nao retornaram cards para revisar.');
return;
}
setSessionLibraries(selectedRagLibraries);
setSessionCards(orderedCards);
setCurrentIndex(0);
setShowAnswer(false);
} catch (err: any) {
setError(err?.message || 'Falha ao iniciar revisao espacada.');
} finally {
setStartingSession(false);
}
};
const endSession = () => {
setSessionCards([]);
setSessionLibraries([]);