Seed z repozitare, zatezove testy, worker bez spanku, dialogy bez rozmazani

Nastaveni prezije nasazeni: seed/records.json se pri prazdnem ulozisti
nacte misto ukazkovych dat (zive uloziste se nikdy neprepisuje). Soubor
nese soucasny stav produkce (firmy s provozovatelem, role, typ ticketu,
akce, widgety, skupiny, rozlozeni). Novy GET /api/admin/export a skript
npm run seed:export pro dalsi exporty, Dockerfile slozku kopiruje.

Vykonnostni testy (npm run test:perf) nad 200 firmami a 10 000 tickety
a zatezovy skript (npm run load) proti bezici instanci vcetne davky
udalosti na webhook. Mereni odhalilo strop workeru: po obsazeni vsech
mist spal sekundu, takze fronta odbavila nejvys 4 behy za sekundu. Ted
ceka na prvni dokonceny beh: 500 udalosti za 1,3 s (395 behu/s). Strop
posluchacu streamu zvednut na 2 000.

Dialogy: prekryv modalu a menu v portalu bez backdrop-blur, tecka Zive
pulzuje jen pri navazovani spojeni - rozmazani cele obrazovky pod trvalou
animaci sekalo video vedle portalu. Bublina udalosti drzi 0,5 s.

Dokumentace 14, 19, 20, 22, 04, 01, 03, 15 a 99 aktualizovana.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
JiriUhlir
2026-09-09 20:41:42 +02:00
co-authored by Claude Fable 5.1
parent c25e826766
commit ea9387bea9
44 changed files with 3512 additions and 28 deletions
+383
View File
@@ -0,0 +1,383 @@
{
"exportedAt": "2026-09-09T18:11:26.935Z",
"source": "https://services.csbot.cz/apps/csbot-prototype (rucni export pres API, pred prvnim nasazenim seed:export)",
"kinds": {
"tenant": [
{
"tenantId": null,
"note": "",
"enabled": true,
"helpdeskProviderId": null,
"createdAt": "2026-09-09T17:35:53.410Z",
"updatedAt": "2026-09-09T18:05:08.910Z",
"id": "tnt_automia",
"name": "Automia",
"intakeToken": "Cr5Zyb2V37JxXRavmziSJbVvE7YgBizF",
"portalOperator": true
},
{
"tenantId": null,
"note": "",
"enabled": true,
"helpdeskProviderId": "tnt_automia",
"createdAt": "2026-09-09T17:35:53.410Z",
"updatedAt": "2026-09-09T17:35:53.410Z",
"id": "tnt_nordis",
"name": "Nordis a.s.",
"intakeToken": "MdbTrIVAbP0XyDf_O6e4KfxZuNZT6YOM"
},
{
"tenantId": null,
"note": "",
"enabled": true,
"helpdeskProviderId": "tnt_automia",
"createdAt": "2026-09-09T17:35:53.410Z",
"updatedAt": "2026-09-09T17:35:53.410Z",
"id": "tnt_logitrans",
"name": "LogiTrans",
"intakeToken": "MYYSQJvAikHV0jEIlONnporiVehP9tzk"
}
],
"role": [
{
"tenantId": null,
"system": true,
"createdAt": "2026-09-09T17:35:53.502Z",
"updatedAt": "2026-09-09T17:35:53.502Z",
"id": "role_admin",
"key": "admin",
"name": "Správce firmy",
"description": "Vidí a nastavuje všechno ve své firmě.",
"permissions": [
"ticket.view",
"ticket.create",
"ticket.comment",
"ticket.assign.self",
"ticket.assign.others",
"ticket.assign.group",
"ticket.status.change",
"ticket.priority.change",
"ticket.type.change",
"ticket.reopen",
"ticket.tag",
"ticketType.manage",
"helpdesk.view",
"helpdesk.create",
"action.manage",
"automation.edit",
"incident.manage",
"connector.manage",
"widget.manage",
"group.manage",
"people.manage",
"user.manage",
"role.manage"
]
},
{
"tenantId": null,
"system": true,
"createdAt": "2026-09-09T17:35:53.502Z",
"updatedAt": "2026-09-09T17:35:53.502Z",
"id": "role_agent",
"key": "agent",
"name": "Řešitel",
"description": "Řeší tickety. Nemůže přehazovat práci ani měnit nastavení.",
"permissions": [
"ticket.view",
"ticket.create",
"ticket.comment",
"ticket.assign.self",
"ticket.status.change",
"ticket.tag"
]
},
{
"tenantId": null,
"system": true,
"createdAt": "2026-09-09T17:35:53.502Z",
"updatedAt": "2026-09-09T17:35:53.502Z",
"id": "role_accountant",
"key": "accountant",
"name": "Účetní",
"description": "Tickety kolem dokladů a akce nad nimi. Ukázka vlastní role.",
"permissions": [
"ticket.view",
"ticket.comment",
"ticket.assign.self",
"ticket.status.change"
]
}
],
"ticketType": [
{
"id": "tt_order",
"tenantId": "tnt_automia",
"key": "order",
"name": "Objednávka",
"icon": "ShoppingCart",
"statuses": [],
"fields": [
{
"id": "fld_order_no",
"key": "orderNumber",
"label": "Číslo objednávky",
"type": "string",
"required": true
},
{
"id": "fld_order_total",
"key": "orderTotal",
"label": "Částka",
"type": "number",
"required": false
},
{
"id": "fld_order_partner",
"key": "partnerId",
"label": "ID odběratele v iDokladu",
"type": "number",
"required": false,
"hint": "Umí ho dohledat akce Najít kontakt."
}
],
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z"
}
],
"ticketAction": [
{
"id": "tka_send_idoklad",
"tenantId": "tnt_automia",
"ticketTypeIds": [
"tt_order"
],
"tags": [],
"label": "Odeslat do iDokladu",
"icon": "Receipt",
"style": "primary",
"order": 1,
"visibleWhen": [
{
"fieldId": "ticket.status",
"operator": "neq",
"value": "resolved"
}
],
"confirm": "Objednávka se odešle do iDokladu. Pokračovat?",
"form": [],
"body": {
"kind": "operation",
"serviceId": "idoklad",
"operationId": "create-issued-invoice",
"connectorId": null,
"inputs": {
"partnerId": "{{partnerId}}",
"description": "Objednávka {{orderNumber}}",
"itemName": "Zboží dle objednávky {{orderNumber}}",
"unitPrice": "{{orderTotal}}"
}
},
"enabled": true,
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z"
}
],
"customWidget": [
{
"tenantId": "tnt_automia",
"ownerId": null,
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z",
"id": "cw_status_month",
"name": "Tickety podle stavu",
"description": "Kolik ticketů je v kterém stavu za tento měsíc.",
"render": "table",
"source": {
"kind": "ticketCount",
"filter": {
"period": "month"
},
"groupBy": "status"
},
"size": "half"
},
{
"tenantId": "tnt_automia",
"ownerId": null,
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z",
"id": "cw_idoklad_invoices",
"name": "Faktury v iDokladu",
"description": "Ukázka widgetu nad konektorem. Bez napojení hlásí, co chybí.",
"render": "stat",
"source": {
"kind": "connector",
"serviceId": "idoklad",
"operationId": "find-issued-invoice",
"connectorId": null,
"inputs": {},
"path": "total",
"ttlSec": 300
},
"size": "third"
},
{
"tenantId": "tnt_automia",
"ownerId": null,
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z",
"id": "cw_agents_30d",
"name": "Kdo kolik odbavil",
"description": "Vyřešené za 30 dní, doba řešení, vrácené tickety a fronta.",
"render": "table",
"source": {
"kind": "agentStats",
"period": "30d"
},
"size": "full"
},
{
"tenantId": "tnt_automia",
"ownerId": null,
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z",
"id": "cw_orders_open",
"name": "Otevřené objednávky",
"description": "Tickety typu Objednávka, které nejsou vyřešené.",
"render": "stat",
"source": {
"kind": "ticketCount",
"filter": {
"typeIds": [
"tt_order"
],
"closed": false
}
},
"size": "third"
},
{
"tenantId": "tnt_automia",
"ownerId": null,
"createdAt": "2026-09-09T17:35:53.503Z",
"updatedAt": "2026-09-09T17:35:53.503Z",
"id": "cw_by_assignee",
"name": "Nevyřešené podle lidí",
"description": "Kdo co má u sebe. Ukázka seskupení.",
"render": "table",
"source": {
"kind": "ticketCount",
"filter": {
"closed": false
},
"groupBy": "assignee"
},
"size": "half"
},
{
"name": "GRAF",
"description": "",
"render": "chart",
"source": {
"kind": "ticketCount",
"filter": {
"closed": false
},
"groupBy": "status"
},
"size": "half",
"ownerId": null,
"id": "cw_3d9c657c",
"tenantId": "tnt_automia",
"createdAt": "2026-09-09T17:36:33.683Z",
"updatedAt": "2026-09-09T17:36:33.683Z"
}
],
"personGroup": [
{
"id": "grp_servicedesk",
"tenantId": "tnt_automia",
"name": "Servicedesk",
"members": [
{
"personId": "usr_2",
"seesAll": true
},
{
"personId": "usr_3",
"seesAll": false
},
{
"personId": "usr_1",
"seesAll": true
}
],
"createdAt": "2026-09-09T17:35:53.502Z",
"updatedAt": "2026-09-09T17:39:29.830Z"
},
{
"name": "IT",
"members": [
{
"personId": "usr_3",
"seesAll": false
}
],
"id": "grp_9c12684a",
"tenantId": "tnt_automia",
"createdAt": "2026-09-09T17:56:38.176Z",
"updatedAt": "2026-09-09T17:56:50.164Z"
},
{
"name": "Vedení",
"members": [
{
"personId": "usr_1",
"seesAll": false
}
],
"id": "grp_6a005b53",
"tenantId": "tnt_automia",
"createdAt": "2026-09-09T17:56:44.268Z",
"updatedAt": "2026-09-09T17:56:45.740Z"
}
],
"dashboardLayout": [
{
"id": "usr_1:tnt_automia",
"tenantId": "tnt_automia",
"userId": "usr_1",
"items": [
{
"id": "w1",
"widgetId": "list.myTickets",
"size": "half"
},
{
"id": "w2",
"widgetId": "list.unassigned",
"size": "half"
},
{
"id": "w6",
"widgetId": "list.tickets",
"size": "half"
},
{
"id": "w7",
"widgetId": "list.incidents",
"size": "half"
},
{
"id": "w_mtudrpj3_4",
"widgetId": "cw_3d9c657c",
"size": "full"
}
],
"createdAt": "2026-09-09T18:11:26.935Z",
"updatedAt": "2026-09-09T18:11:26.935Z"
}
]
}
}