[{"data":1,"prerenderedAt":806},["ShallowReactive",2],{"games":3,"levels:poisoned-review":107,"level:poisoned-review:store-dashboard":124},[4,17,30,41,52,63,74,85,96],{"id":5,"order":6,"domain":7,"glyph":8,"requiresSandbox":9,"title":10,"tagline":13,"levelCount":6,"status":16},"legacy-nightmare",1,"refactoring","{ }",true,{"fr":11,"en":12},"Le cauchemar du Legacy","Legacy Nightmare",{"fr":14,"en":15},"Corrige le bug caché dans un code spaghetti, sans rien casser.","Fix the bug buried in spaghetti code without breaking anything.","available",{"id":18,"order":19,"domain":20,"glyph":20,"requiresSandbox":21,"title":22,"tagline":25,"levelCount":28,"status":29},"git-untangle",2,"git",false,{"fr":23,"en":24},"Démêlage d'historique","History Untangling",{"fr":26,"en":27},"Transforme un graphe de commits chaotique en historique propre.","Turn a chaotic commit graph into a clean history.",0,"coming-soon",{"id":31,"order":32,"domain":33,"glyph":34,"requiresSandbox":21,"title":35,"tagline":38,"levelCount":28,"status":29},"prod-pressure",3,"devops","RPS",{"fr":36,"en":37},"Pression en Prod","Prod Pressure",{"fr":39,"en":40},"Fais tenir la prod pendant le Black Friday, sans exploser le budget.","Keep production alive through Black Friday, on budget.",{"id":42,"order":43,"domain":44,"glyph":45,"requiresSandbox":9,"title":46,"tagline":49,"levelCount":28,"status":29},"the-heist",4,"security","0day",{"fr":47,"en":48},"Le braquage","The Heist",{"fr":50,"en":51},"Lis l'API, trouve la faille logique, exploite-la.","Read the API, find the logic flaw, exploit it.",{"id":53,"order":54,"domain":55,"glyph":56,"requiresSandbox":21,"title":57,"tagline":60,"levelCount":6,"status":16},"tech-dilemmas",5,"product","A|B",{"fr":58,"en":59},"Dilemmes","Tech Dilemmas",{"fr":61,"en":62},"Survis à un sprint d'arbitrages impossibles.","Survive a sprint of impossible trade-offs.",{"id":64,"order":65,"domain":66,"glyph":67,"requiresSandbox":21,"title":68,"tagline":71,"levelCount":28,"status":29},"cap-workshop",6,"distributed","CAP",{"fr":69,"en":70},"L'Atelier du Théorème CAP","CAP Workshop",{"fr":72,"en":73},"Choisis les bons compromis avant que le réseau ne se coupe.","Pick the right trade-offs before the network splits.",{"id":75,"order":76,"domain":77,"glyph":78,"requiresSandbox":9,"title":79,"tagline":82,"levelCount":28,"status":29},"feature-creeps",7,"patterns","\u003CT>",{"fr":80,"en":81},"L'attaque des Feature Creeps","Attack of the Feature Creeps",{"fr":83,"en":84},"Absorbe des règles métier sans fin sans réécrire ton cœur.","Absorb endless business rules without rewriting your core.",{"id":86,"order":87,"domain":88,"glyph":89,"requiresSandbox":21,"title":90,"tagline":93,"levelCount":32,"status":16},"poisoned-review",8,"review","PR",{"fr":91,"en":92},"La Code Review Empoisonnée","Poisoned Code Review",{"fr":94,"en":95},"Une PR parfaite en apparence cache une bombe. Trouve la ligne.","A flawless-looking PR hides a time bomb. Find the line.",{"id":97,"order":98,"domain":99,"glyph":100,"requiresSandbox":21,"hidden":9,"title":101,"tagline":104,"levelCount":6,"status":16},"engine-demo",99,"demo","?",{"fr":102,"en":103},"Démo du moteur de niveaux","Level engine demo",{"fr":105,"en":106},"Niveau factice qui exerce le moteur de bout en bout : indices, validation, score, débrief.","Dummy level exercising the engine end to end: hints, validation, score, debrief.",[108,113,118],{"id":109,"gameId":86,"order":6,"title":110,"difficulty":19,"estimatedMinutes":65},"store-dashboard",{"fr":111,"en":112},"Le dashboard des magasins","The store dashboard",{"id":114,"gameId":86,"order":19,"title":115,"difficulty":32,"estimatedMinutes":87},"wallet-transfer",{"fr":116,"en":117},"Virements entre portefeuilles","Wallet transfers",{"id":119,"gameId":86,"order":32,"title":120,"difficulty":32,"estimatedMinutes":123},"fx-rates-client",{"fr":121,"en":122},"Le client de taux de change","The FX rates client",10,{"id":109,"gameId":86,"order":6,"title":125,"difficulty":19,"estimatedMinutes":65,"context":126,"objective":129,"tools":132,"initialState":135,"hints":796,"scoring":803},{"fr":111,"en":112},{"fr":127,"en":128},"Le back-office affiche un widget « Dernières commandes » sur la tablette de **chaque magasin** (≈ 800 magasins), rafraîchi **toutes les 10 secondes**.\n\nCette PR ajoute l'endpoint qui l'alimente. Elle est verte en CI, et la démo en local (base de seed : 3 commandes) est instantanée. Elle part en prod demain matin.","The back office shows a \"Latest orders\" widget on the tablet of **every store** (≈ 800 stores), refreshed **every 10 seconds**.\n\nThis PR adds the endpoint behind it. CI is green, and the local demo (seed database: 3 orders) is instant. It ships to production tomorrow morning.",{"fr":130,"en":131},"Trouve la ligne qui va faire souffrir la base de données en production, puis nomme le problème.","Find the line that will hurt the database in production, then name the problem.",[133,134],"diff-viewer","justification-menu",{"pr":136,"justificationOptions":147,"files":178},{"number":137,"title":138,"author":141,"description":142,"base":145,"head":146},482,{"fr":139,"en":140},"feat(orders) : widget des dernières commandes avec infos client","feat(orders): latest orders widget with customer details","nora-k",{"fr":143,"en":144},"## Résumé\nAjoute `GET \u002Fstores\u002F:storeId\u002Forders\u002Frecent`, utilisé par le nouveau widget du back-office.\n\n## Changements\n- `OrdersService.getRecentSummaries()` : dernières commandes du magasin, enrichies avec le nom et le statut du client\n- Limite plafonnée à 100 pour protéger l'API\n- DTO `OrderSummary` dédié, sans champ sensible\n\n## Tests\n- ✅ Tests unitaires du service (repositories mockés)\n- ✅ Testé en local sur la base de seed : réponse en 4 ms\n\n_Description générée avec l'assistant de PR._","## Summary\nAdds `GET \u002Fstores\u002F:storeId\u002Forders\u002Frecent`, used by the new back-office widget.\n\n## Changes\n- `OrdersService.getRecentSummaries()`: latest orders of the store, enriched with the customer's name and tier\n- Limit capped at 100 to protect the API\n- Dedicated `OrderSummary` DTO, no sensitive field\n\n## Testing\n- ✅ Service unit tests (mocked repositories)\n- ✅ Tested locally on the seed database: 4 ms response\n\n_Description generated with the PR assistant._","main","feat\u002Frecent-orders-widget",[148,153,158,163,168,173],{"id":149,"label":150},"missing-index",{"fr":151,"en":152},"Index manquant (scan complet)","Missing index (full scan)",{"id":154,"label":155},"n-plus-one",{"fr":156,"en":157},"Requête N+1","N+1 query",{"id":159,"label":160},"unbounded-query",{"fr":161,"en":162},"Requête non bornée (pas de pagination)","Unbounded query (no pagination)",{"id":164,"label":165},"float-money",{"fr":166,"en":167},"Montants en virgule flottante","Floating-point money",{"id":169,"label":170},"race-condition",{"fr":171,"en":172},"Condition de course","Race condition",{"id":174,"label":175},"memory-leak",{"fr":176,"en":177},"Fuite mémoire","Memory leak",[179,576,703],{"path":180,"language":181,"status":182,"hunks":183},"src\u002Forders\u002Forders.service.ts","typescript","modified",[184,265],{"header":185,"lines":186},"@@ -1,6 +1,7 @@",[187,203,213,223,238,241,251],{"id":188,"type":189,"oldNo":6,"newNo":6,"tokens":190},"487a4b6f6f","ctx",[191,194,196,198,200],{"content":192,"color":193},"import","#FF7B72",{"content":195}," { Injectable } ",{"content":197,"color":193},"from",{"content":199}," ",{"content":201,"color":202},"'@nestjs\u002Fcommon'","#A5D6FF",{"id":204,"type":189,"oldNo":19,"newNo":19,"tokens":205},"d6729f5ffd",[206,207,209,210,211],{"content":192,"color":193},{"content":208}," { OrderRepository } ",{"content":197,"color":193},{"content":199},{"content":212,"color":202},"'.\u002Forder.repository'",{"id":214,"type":189,"oldNo":32,"newNo":32,"tokens":215},"43a85c670a",[216,217,219,220,221],{"content":192,"color":193},{"content":218}," { CustomerRepository } ",{"content":197,"color":193},{"content":199},{"content":222,"color":202},"'..\u002Fcustomers\u002Fcustomer.repository'",{"id":224,"type":225,"oldNo":226,"newNo":43,"tokens":227},"fd3f184195","add",null,[228,229,230,232,234,235,236],{"content":192,"color":193},{"content":199},{"content":231,"color":193},"type",{"content":233}," { OrderSummary } ",{"content":197,"color":193},{"content":199},{"content":237,"color":202},"'.\u002Forder-summary.dto'",{"id":239,"type":189,"oldNo":43,"newNo":54,"tokens":240},"6c1716016a",[],{"id":242,"type":189,"oldNo":54,"newNo":65,"tokens":243},"2c0ff9043f",[244,246,249],{"content":245},"@",{"content":247,"color":248},"Injectable","#D2A8FF",{"content":250},"()",{"id":252,"type":189,"oldNo":65,"newNo":76,"tokens":253},"cc4951608f",[254,256,257,259,260,263],{"content":255,"color":193},"export",{"content":199},{"content":258,"color":193},"class",{"content":199},{"content":261,"color":262},"OrdersService","#FFA657",{"content":264}," {",{"header":266,"lines":267},"@@ -18,4 +19,29 @@ export class OrdersService {",[268,279,297,303,307,316,322,328,334,359,376,382,392,406,412,416,425,438,454,460,470,485,498,532,547,553,559,565,570],{"id":269,"type":189,"oldNo":270,"newNo":271,"tokens":272},"c08b89f8d4",18,19,[273,275,277],{"content":274},"  async ",{"content":276,"color":248},"findById",{"content":278},"(id: string) {",{"id":280,"type":189,"oldNo":271,"newNo":281,"tokens":282},"1a3f40e736",20,[283,285,287,288,291,293,295],{"content":284},"    ",{"content":286,"color":193},"return",{"content":199},{"content":289,"color":290},"this","#79C0FF",{"content":292},".orders.",{"content":294,"color":248},"findOne",{"content":296},"({ where: { id } })",{"id":298,"type":189,"oldNo":281,"newNo":299,"tokens":300},"55443aad48",21,[301],{"content":302},"  }",{"id":304,"type":225,"oldNo":226,"newNo":305,"tokens":306},"189ab2726c",22,[],{"id":308,"type":225,"oldNo":226,"newNo":309,"tokens":310},"7d18c3ad25",23,[311,313],{"content":312},"  ",{"content":314,"color":315},"\u002F**","#8B949E",{"id":317,"type":225,"oldNo":226,"newNo":318,"tokens":319},"503bb5d1a7",24,[320],{"content":321,"color":315},"   * Latest orders of a store, enriched with the customer's display data,",{"id":323,"type":225,"oldNo":226,"newNo":324,"tokens":325},"18dc935b6b",25,[326],{"content":327,"color":315},"   * for the back-office dashboard.",{"id":329,"type":225,"oldNo":226,"newNo":330,"tokens":331},"da1512482e",26,[332],{"content":333,"color":315},"   *\u002F",{"id":335,"type":225,"oldNo":226,"newNo":336,"tokens":337},"96eeee4b85",27,[338,339,341,343,345,346,348,350,352,354,356,358],{"content":274},{"content":340,"color":248},"getRecentSummaries",{"content":342},"(storeId: string, limit ",{"content":344,"color":193},"=",{"content":199},{"content":347,"color":290},"50",{"content":349},"): ",{"content":351,"color":290},"Promise",{"content":353,"color":193},"\u003C",{"content":355},"OrderSummary[]",{"content":357,"color":193},">",{"content":264},{"id":360,"type":225,"oldNo":226,"newNo":361,"tokens":362},"55b0e3851d",28,[363,365,366,367,369,370,371,372,374],{"content":364},"    const orders ",{"content":344,"color":193},{"content":199},{"content":368,"color":193},"await",{"content":199},{"content":289,"color":290},{"content":292},{"content":373,"color":248},"find",{"content":375},"({",{"id":377,"type":225,"oldNo":226,"newNo":378,"tokens":379},"83dcdf1777",29,[380],{"content":381},"      where: { storeId },",{"id":383,"type":225,"oldNo":226,"newNo":384,"tokens":385},"c9729bdb08",30,[386,388,390],{"content":387},"      order: { createdAt: ",{"content":389,"color":202},"'DESC'",{"content":391}," },",{"id":393,"type":225,"oldNo":226,"newNo":394,"tokens":395},"148e1188bc",31,[396,398,400,402,404],{"content":397},"      take: Math.",{"content":399,"color":248},"min",{"content":401},"(limit, ",{"content":403,"color":290},"100",{"content":405},"),",{"id":407,"type":225,"oldNo":226,"newNo":408,"tokens":409},"57e4dfc4bc",32,[410],{"content":411},"    })",{"id":413,"type":225,"oldNo":226,"newNo":414,"tokens":415},"50df1cac02",33,[],{"id":417,"type":225,"oldNo":226,"newNo":418,"tokens":419},"b285ea27ee",34,[420,422,423],{"content":421},"    const summaries: OrderSummary[] ",{"content":344,"color":193},{"content":424}," []",{"id":426,"type":225,"oldNo":226,"newNo":427,"tokens":428},"dfd6ced868",35,[429,430,432,434,436],{"content":284},{"content":431,"color":248},"for",{"content":433}," (const order ",{"content":435,"color":193},"of",{"content":437}," orders) {",{"id":439,"type":225,"oldNo":226,"newNo":440,"tokens":441},"123e51322e",36,[442,444,445,446,447,448,449,451,452],{"content":443},"      const customer ",{"content":344,"color":193},{"content":199},{"content":368,"color":193},{"content":199},{"content":289,"color":290},{"content":450},".customers.",{"content":294,"color":248},{"content":453},"({ where: { id: order.customerId } })",{"id":455,"type":225,"oldNo":226,"newNo":456,"tokens":457},"2aad0b146e",37,[458],{"content":459},"      summaries.push({",{"id":461,"type":225,"oldNo":226,"newNo":462,"tokens":463},"d0c8233a38",38,[464,466,468],{"content":465},"        ",{"content":467,"color":262},"id",{"content":469},": order.id,",{"id":471,"type":225,"oldNo":226,"newNo":472,"tokens":473},"2f194aa380",39,[474,475,477,479,481,482,483],{"content":465},{"content":476,"color":262},"total",{"content":478},": order.totalCents ",{"content":480,"color":193},"\u002F",{"content":199},{"content":403,"color":290},{"content":484},",",{"id":486,"type":225,"oldNo":226,"newNo":487,"tokens":488},"01caddd250",40,[489,490,492,494,496],{"content":465},{"content":491,"color":262},"createdAt",{"content":493},": order.createdAt.",{"content":495,"color":248},"toISOString",{"content":497},"(),",{"id":499,"type":225,"oldNo":226,"newNo":500,"tokens":501},"b0ce732eab",41,[502,503,505,507,508,509,511,513,515,517,519,520,521,523,525,526,528,529,531],{"content":465},{"content":504,"color":262},"customerName",{"content":506},": customer ",{"content":100,"color":193},{"content":199},{"content":510,"color":202},"`${",{"content":512},"customer",{"content":514,"color":202},".",{"content":516},"firstName",{"content":518,"color":202},"} ${",{"content":512},{"content":514,"color":202},{"content":522},"lastName",{"content":524,"color":202},"}`",{"content":199},{"content":527,"color":193},":",{"content":199},{"content":530,"color":202},"'Unknown customer'",{"content":484},{"id":533,"type":225,"oldNo":226,"newNo":534,"tokens":535},"608c3d98fa",42,[536,537,539,541,543,544,546],{"content":465},{"content":538,"color":262},"customerTier",{"content":540},": customer?.tier ",{"content":542,"color":193},"??",{"content":199},{"content":545,"color":202},"'standard'",{"content":484},{"id":548,"type":225,"oldNo":226,"newNo":549,"tokens":550},"774d6786c5",43,[551],{"content":552},"      })",{"id":554,"type":225,"oldNo":226,"newNo":555,"tokens":556},"a3d2442ecd",44,[557],{"content":558},"    }",{"id":560,"type":225,"oldNo":226,"newNo":561,"tokens":562},"10808e8ae0",45,[563],{"content":564},"    return summaries",{"id":566,"type":225,"oldNo":226,"newNo":567,"tokens":568},"4a73e89783",46,[569],{"content":302},{"id":571,"type":189,"oldNo":299,"newNo":572,"tokens":573},"007883401e",47,[574],{"content":575},"}",{"path":577,"language":181,"status":182,"hunks":578},"src\u002Forders\u002Forders.controller.ts",[579],{"header":580,"lines":581},"@@ -14,5 +14,11 @@ export class OrdersController {",[582,596,611,624,629,632,641,649,673,695,699],{"id":583,"type":189,"oldNo":584,"newNo":584,"tokens":585},"0c7f122aa3",14,[586,588,590,592,594],{"content":587},"  @",{"content":589,"color":248},"Get",{"content":591},"(",{"content":593,"color":202},"':orderId'",{"content":595},")",{"id":597,"type":189,"oldNo":598,"newNo":598,"tokens":599},"fce9e13140",15,[600,601,602,604,606,607,609],{"content":312},{"content":294,"color":248},{"content":603},"(@",{"content":605,"color":248},"Param",{"content":591},{"content":608,"color":202},"'orderId'",{"content":610},") orderId: string) {",{"id":612,"type":189,"oldNo":613,"newNo":613,"tokens":614},"5231672756",16,[615,616,617,618,619,621,622],{"content":284},{"content":286,"color":193},{"content":199},{"content":289,"color":290},{"content":620},".ordersService.",{"content":276,"color":248},{"content":623},"(orderId)",{"id":625,"type":189,"oldNo":626,"newNo":626,"tokens":627},"fe05be6ca4",17,[628],{"content":302},{"id":630,"type":225,"oldNo":226,"newNo":270,"tokens":631},"541ef53159",[],{"id":633,"type":225,"oldNo":226,"newNo":271,"tokens":634},"0a7280e9e3",[635,636,637,638,640],{"content":587},{"content":589,"color":248},{"content":591},{"content":639,"color":202},"'recent'",{"content":595},{"id":642,"type":225,"oldNo":226,"newNo":281,"tokens":643},"2f5441e3a6",[644,645,647],{"content":587},{"content":646,"color":248},"UseGuards",{"content":648},"(StoreStaffGuard)",{"id":650,"type":225,"oldNo":226,"newNo":299,"tokens":651},"b14e4852f9",[652,653,655,656,657,658,660,662,664,665,667,669,671],{"content":312},{"content":654,"color":248},"getRecent",{"content":603},{"content":605,"color":248},{"content":591},{"content":659,"color":202},"'storeId'",{"content":661},") storeId: string, @",{"content":663,"color":248},"Query",{"content":591},{"content":666,"color":202},"'limit'",{"content":668},") limit",{"content":670,"color":193},"?:",{"content":672}," string) {",{"id":674,"type":225,"oldNo":226,"newNo":305,"tokens":675},"c4a21f1457",[676,677,678,679,680,681,682,684,685,686,688,690,691,692,694],{"content":284},{"content":286,"color":193},{"content":199},{"content":289,"color":290},{"content":620},{"content":340,"color":248},{"content":683},"(storeId, limit ",{"content":100,"color":193},{"content":199},{"content":687,"color":248},"Number",{"content":689},"(limit) ",{"content":527,"color":193},{"content":199},{"content":693,"color":290},"undefined",{"content":595},{"id":696,"type":225,"oldNo":226,"newNo":309,"tokens":697},"c41de9cdd6",[698],{"content":302},{"id":700,"type":189,"oldNo":270,"newNo":318,"tokens":701},"d071d699e9",[702],{"content":575},{"path":704,"language":181,"status":705,"hunks":706},"src\u002Forders\u002Forder-summary.dto.ts","added",[707],{"header":708,"lines":709},"@@ -0,0 +1,11 @@",[710,722,725,730,741,750,756,765,773,782,791],{"id":711,"type":225,"oldNo":226,"newNo":6,"tokens":712},"35dbaad932",[713,714,715,716,718,719,720],{"content":192,"color":193},{"content":199},{"content":231,"color":193},{"content":717}," { CustomerTier } ",{"content":197,"color":193},{"content":199},{"content":721,"color":202},"'..\u002Fcustomers\u002Fcustomer.entity'",{"id":723,"type":225,"oldNo":226,"newNo":19,"tokens":724},"5252d49421",[],{"id":726,"type":225,"oldNo":226,"newNo":32,"tokens":727},"f02adf13ba",[728],{"content":729,"color":315},"\u002F** Row of the back-office \"recent orders\" widget *\u002F",{"id":731,"type":225,"oldNo":226,"newNo":43,"tokens":732},"dda9f50875",[733,734,735,737,738,740],{"content":255,"color":193},{"content":199},{"content":736,"color":193},"interface",{"content":199},{"content":739,"color":262},"OrderSummary",{"content":264},{"id":742,"type":225,"oldNo":226,"newNo":54,"tokens":743},"001060fba9",[744,745,746,747,748],{"content":312},{"content":467,"color":262},{"content":527,"color":193},{"content":199},{"content":749,"color":290},"string",{"id":751,"type":225,"oldNo":226,"newNo":65,"tokens":752},"96c398f44f",[753,754],{"content":312},{"content":755,"color":315},"\u002F** In euros, for display only *\u002F",{"id":757,"type":225,"oldNo":226,"newNo":76,"tokens":758},"92a7625ea2",[759,760,761,762,763],{"content":312},{"content":476,"color":262},{"content":527,"color":193},{"content":199},{"content":764,"color":290},"number",{"id":766,"type":225,"oldNo":226,"newNo":87,"tokens":767},"6ce3849900",[768,769,770,771,772],{"content":312},{"content":491,"color":262},{"content":527,"color":193},{"content":199},{"content":749,"color":290},{"id":774,"type":225,"oldNo":226,"newNo":775,"tokens":776},"4e76afd1fc",9,[777,778,779,780,781],{"content":312},{"content":504,"color":262},{"content":527,"color":193},{"content":199},{"content":749,"color":290},{"id":783,"type":225,"oldNo":226,"newNo":123,"tokens":784},"f758d1d781",[785,786,787,788,789],{"content":312},{"content":538,"color":262},{"content":527,"color":193},{"content":199},{"content":790,"color":262},"CustomerTier",{"id":792,"type":225,"oldNo":226,"newNo":793,"tokens":794},"b191069cf0",11,[795],{"content":575},[797,799,801],{"type":798},"observation",{"type":800},"reflection",{"type":802},"focus",{"base":804,"parTimeSeconds":805},100,240,1790619204009]