Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Leave: share balance, balance-status and update results between CLI and MCP

Aperta
#95 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Start with RateLookupResult, LeaveCreateService.ApplyAsync, LeaveCreateResult, and the listed LeaveBalanceLookup, LeaveBalanceStatusResult, LeaveUpdateService.ApplyAsync, and LeaveBalanceImportService entry points. Trace how the CLI commands and MCP handlers currently serialize each result, then use the migration checklist and #62 to define done, including the 0.4.0 contract or PermittedDifferences handling.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Priority: P2 Type: Refactor

Why

Leave create, update and list share services well. The remaining leave reads and the update result are still per-surface, and the difference is visible to agents:

  • GetLeaveBalance: a miss is {"error":"No leave stats found for …"} on MCP but {found:false, empId} with exit 0 on tp leave balance --json. A new starter with no leave history looks like a failure to an agent.
  • GetLeaveBalanceStatus and leave balances status duplicate the LastImportedAt == null → imported:false branch.
  • LeaveUpdateService.ApplyAsync returns nothing, so UpdateCommand and UpdateLeave each hand-build the same {success, leaveId, changes} and dry-run objects.
  • LeaveListService returns the envelope, but both adapters throw away cancelledCount and paging (#62).
  • ImportLeaveBalances adds mayHaveBeenApplied:true on an uncertain import; the CLI emits a plain error for the same case.

Migrate

  • LeaveBalanceLookup returning LeaveBalanceResult { found, empId, daysSinceLastLeave, leaveTakenInLast12Months }, used by leave balance and GetLeaveBalance.
  • LeaveBalanceStatusResult shared by leave balances status and GetLeaveBalanceStatus.
  • LeaveUpdateService.ApplyAsync returns a LeaveUpdateResult; both adapters serialise it.
  • One typed "may have been applied" outcome from LeaveBalanceImportService, rendered the same way on both surfaces.
  • Fold in #62.

How

RateLookupResult for "a miss shares the hit's schema"; LeaveCreateService.ApplyAsync / LeaveCreateResult for the update result.

Contract

The MCP GetLeaveBalance miss and the leave-list envelope change shape: hold for 0.4.0 or declare them in PermittedDifferences until then.

Part of #38.

Lingua principale
C#
Stelle
3
Fork
0
Merge medio
11m
PR unite (30g)
4

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SSWConsulting/TimePro.Tools

Tutte le issue di SSWConsulting/TimePro.Tools

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.