Skip to content

refactor: repositorios y acceso a datos - #241

Merged
CiroMirkin merged 17 commits into
devfrom
refactor/dao
Oct 3, 2026
Merged

CiroMirkin merged 17 commits into
devfrom
refactor/dao

Conversation

@CiroMirkin

@CiroMirkin CiroMirkin commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Todo lo que una feature guarda por tablero (tareas, archivo, limbo, notas, notas archivadas, recordatorios, pizarra) se lee y se escribe a través de un repositorio de web-app/src/shared/repository/. El módulo reparte el trabajo en tres piezas.

  1. Qué se guarda y cuándo. Lo decide el repositorio (Repository<T> y sus subclases), que no sabe dónde terminan los datos.
  2. Dónde se guarda. Lo decide la fuente (LocalStorageDataSource para invitados, ServerActionDataSource con sesión), que no sabe nada del dominio.
  3. Cuál de las dos fuentes se usa. Lo decide bySession, en la fábrica de cada feature, una sola vez por llamada.

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
capo Ready Ready Preview Oct 1, 2026 3:34pm UTC

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

React Doctor found 2 new issues in 1 file · 2 warnings · score 90 / 100 (Great) · 0 fixed · vs dev

2 warnings

src/features/tasks/api/actions/applyTaskBoardChanges.ts

  • ⚠️ L151 await inside a loop async-await-in-loop
  • ⚠️ L176 await inside a loop async-await-in-loop

Reviewed by React Doctor for commit 761b48c. See inline comments for fixes.

// Mismo orden que emite diffTaskBoard: columnas → deletes de tareas → tareas → deletes de columnas.
for (const { id, name, order } of upsertColumns) {
if (isPlaceholder(id)) {
const realId = await resolveColumnId(id, name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Doctor · react-doctor/async-await-in-loop (warning)

This makes the for…of loop slow because each await runs one after another, so collect the independent calls & run them together with await Promise.all(items.map(...))

Fix → Collect the items, then use await Promise.all(items.map(...)) so independent work runs at the same time

Docs

for (const { task, columnId, order } of upsertTasks) {
const data = {
descriptionText: task.descriptionText,
columnId: await resolveColumnId(columnId),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Doctor · react-doctor/async-await-in-loop (warning)

This makes the for…of loop slow because each await runs one after another, so collect the independent calls & run them together with await Promise.all(items.map(...))

Fix → Collect the items, then use await Promise.all(items.map(...)) so independent work runs at the same time

Docs

@CiroMirkin
CiroMirkin merged commit b3850f9 into dev Oct 3, 2026
4 checks passed
@CiroMirkin
CiroMirkin deleted the refactor/dao branch October 3, 2026 13:35

This branch was successfully deployed

1 active deployment
Preview — 761b48cd Deployed Oct 1, 2026 by vercel[bot]
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.

1 participant