@nightkatana/kronosys-app 1.0.0-beta.2 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/app/api/action/route.ts +39 -3
- package/app/api/action-logs/route.ts +24 -0
- package/app/api/backup/route.ts +1 -1
- package/app/api/restore/route.ts +145 -0
- package/app/changelog/page.tsx +71 -4
- package/app/globals.css +127 -0
- package/app/guide/page.tsx +61 -15
- package/app/implementation/page.tsx +700 -0
- package/app/layout.tsx +14 -3
- package/app/licenses/page.tsx +99 -37
- package/app/logs/page.tsx +258 -0
- package/app/manifest.ts +5 -5
- package/app/page.tsx +784 -229
- package/app/reporting/page.tsx +1266 -474
- package/app/settings/page.tsx +252 -18
- package/bin/kronosys.mjs +140 -15
- package/components/KronosysPayloadProvider.tsx +2 -0
- package/components/RouteTransition.tsx +18 -0
- package/components/dashboard/AppShellCommandCenterPlaceholder.tsx +17 -0
- package/components/dashboard/AppShellHeaderSessionMeta.tsx +210 -0
- package/components/dashboard/AppShellHeaderWallClock.tsx +54 -0
- package/components/dashboard/AppShellLiveSessionDrawer.tsx +154 -38
- package/components/dashboard/AppShellRouteNav.tsx +323 -48
- package/components/dashboard/DashboardPauseBackdrop.tsx +50 -0
- package/components/dashboard/DashboardSimpleModal.tsx +168 -25
- package/components/dashboard/DashboardTour.tsx +115 -29
- package/components/dashboard/GlobalPauseConfirmModal.tsx +183 -0
- package/components/dashboard/KronosysDatetimePopoverField.tsx +167 -122
- package/components/dashboard/KronosysTimePopoverField.tsx +54 -12
- package/components/dashboard/NewSessionScopeModal.tsx +211 -20
- package/components/dashboard/PlannedTaskBoundaryConflictWatcher.tsx +275 -0
- package/components/dashboard/ReportingTour.tsx +87 -21
- package/components/dashboard/SavedProjectPicker.tsx +16 -3
- package/components/dashboard/SelectedSessionSidebarBlock.tsx +512 -142
- package/components/dashboard/SessionListPanel.tsx +327 -44
- package/components/dashboard/SettingsTagsProjectsSection.tsx +1073 -264
- package/components/dashboard/SettingsTaskTemplatesSection.tsx +316 -0
- package/components/dashboard/SettingsTour.tsx +86 -21
- package/components/dashboard/TagPills.tsx +14 -1
- package/components/dashboard/TaskFocusPanel.tsx +1081 -478
- package/components/dashboard/TaskSessionLiveCard.tsx +650 -135
- package/components/dashboard/TaskTimelineGanttModal.tsx +601 -0
- package/components/dashboard/taskFieldStyles.ts +20 -4
- package/components/dashboard/useReportingInteractionState.ts +80 -0
- package/lib/appShellHeaderClasses.ts +13 -0
- package/lib/businessRulesMatrix.ts +210 -0
- package/lib/copyToClipboard.ts +43 -0
- package/lib/dashboardCopy.ts +494 -84
- package/lib/dashboardQuickSearch.ts +54 -2
- package/lib/dashboardTimeZone.ts +109 -0
- package/lib/formatAppShellWallClock.ts +66 -0
- package/lib/formatSessionNameTemplate.ts +141 -0
- package/lib/generatedUserChangelog.ts +177 -6
- package/lib/globalPausePreview.ts +292 -0
- package/lib/implementationNotes.ts +1188 -0
- package/lib/kronosysApi.ts +6 -0
- package/lib/kronosysDashboardModalGates.ts +24 -0
- package/lib/plannedBoundaryAttention.ts +9 -0
- package/lib/plannedBoundaryConflict.ts +23 -0
- package/lib/reportingAggregate.ts +517 -75
- package/lib/reportingMetricHelp.ts +8 -0
- package/lib/reportingStrings.ts +37 -3
- package/lib/sessionListMerge.ts +4 -0
- package/lib/sessionTaskSidebarStats.ts +182 -21
- package/lib/settingsCopy.ts +178 -4
- package/lib/taskParsing.ts +360 -103
- package/lib/taskTemplateDraft.ts +135 -0
- package/lib/taskTimelineGantt.ts +265 -0
- package/lib/temporalDisplayPlanned.ts +71 -0
- package/lib/userGuideCopy.ts +121 -47
- package/next.config.ts +7 -0
- package/package.json +12 -24
- package/server/actionDispatch.ts +1000 -77
- package/server/actionTaskSession.ts +337 -24
- package/server/db.ts +7 -15
- package/server/dbSchema.ts +24 -0
- package/server/defaultCfg.ts +5 -0
- package/server/gitlabTokenStore.ts +0 -12
- package/server/liveHistorySync.ts +53 -0
- package/server/mainTimerHydrate.ts +38 -2
- package/server/payloadStore.ts +33 -11
- package/server/sessionWallHydrate.ts +66 -3
- package/server/userActionLog.ts +126 -0
- package/sonar-project.properties +11 -0
- package/tsconfig.json +2 -1
- package/components/dashboard/IssuePickerModal.tsx +0 -168
- package/components/dashboard/ThemeToggle.test.tsx +0 -26
- package/lib/backupCsvExport.test.ts +0 -149
- package/lib/dashboardQuickSearchQuery.test.ts +0 -63
- package/lib/dataDir.test.ts +0 -87
- package/lib/formatIsoShort.test.ts +0 -46
- package/lib/kronoFocusRhythm.test.ts +0 -130
- package/lib/kronoFocusTimerUrgency.test.ts +0 -74
- package/lib/legacyKronoFocusStorageKeys.test.ts +0 -29
- package/lib/reportingAggregate.test.ts +0 -325
- package/lib/reportingNonFinalIndicators.test.ts +0 -157
- package/lib/reportingTagWeekBreakdown.test.ts +0 -141
- package/lib/reportingWeekLayout.test.ts +0 -239
- package/lib/sessionAssiduity.test.ts +0 -25
- package/lib/sessionEndWarnings.test.ts +0 -200
- package/lib/sessionListMerge.test.ts +0 -101
- package/lib/sessionTaskSidebarStats.test.ts +0 -24
- package/lib/taskParsing.test.ts +0 -153
- package/lib/usageProfile.test.ts +0 -84
- package/server/actionDispatch.test.ts +0 -723
- package/server/actionTaskSession.test.ts +0 -713
- package/server/kronoFocusHydrate.test.ts +0 -142
- package/server/kronoFocusMigrate.test.ts +0 -53
- package/server/mainTimerHydrate.test.ts +0 -65
- package/server/payloadStore.test.ts +0 -78
- package/server/sessionWallHydrate.test.ts +0 -46
package/lib/kronosysApi.ts
CHANGED
|
@@ -52,6 +52,8 @@ export type KronosysUpdatePayload = {
|
|
|
52
52
|
inspectingSessionId?: string | null;
|
|
53
53
|
knownTags?: string[];
|
|
54
54
|
knownProjects?: string[];
|
|
55
|
+
/** Projets issus de jetons `!` (temps personnel), distincts des projets `@`. */
|
|
56
|
+
knownPersonalProjects?: string[];
|
|
55
57
|
/** Étiquettes épinglées manuellement (raccourcis même sans tâche). */
|
|
56
58
|
userKnownTags?: string[];
|
|
57
59
|
/** Étiquettes masquées des raccourcis (données des tâches inchangées). */
|
|
@@ -114,6 +116,10 @@ export type KronosysActionResponse = {
|
|
|
114
116
|
pushSessionToMongo?:
|
|
115
117
|
| { ok: true }
|
|
116
118
|
| { ok: false; error: "disabled" | "not_found" | "mongo_failed" | "uri_incomplete" };
|
|
119
|
+
/** `newSession` rétroactif : id inséré dans l’historique sans remplacer la session live. */
|
|
120
|
+
newHistorySessionId?: string;
|
|
121
|
+
/** Validation serveur (ex. session passée sans `sessionEndAt`). */
|
|
122
|
+
newSessionError?: string;
|
|
117
123
|
} | null;
|
|
118
124
|
};
|
|
119
125
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordination légère entre modales du tableau de bord (ex. conflit au démarrage d’une tâche
|
|
3
|
+
* vs conflit lorsqu’une tâche planifiée entre dans la fenêtre « en cours »).
|
|
4
|
+
* Évite deux dialogues concurrents pour le même état d’esprit utilisateur.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
let concurrentTaskStartConflictModalOpen = false;
|
|
8
|
+
let plannedBoundaryConflictModalOpen = false;
|
|
9
|
+
|
|
10
|
+
export function setConcurrentTaskStartConflictModalOpen(value: boolean): void {
|
|
11
|
+
concurrentTaskStartConflictModalOpen = value;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function isConcurrentTaskStartConflictModalOpen(): boolean {
|
|
15
|
+
return concurrentTaskStartConflictModalOpen;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function setPlannedBoundaryConflictModalOpen(value: boolean): void {
|
|
19
|
+
plannedBoundaryConflictModalOpen = value;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function isPlannedBoundaryConflictModalOpen(): boolean {
|
|
23
|
+
return plannedBoundaryConflictModalOpen;
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Émis lorsqu’une tâche quitte l’affichage « planifié » et entre en conflit avec d’autres minuteurs. */
|
|
2
|
+
export const PLANNED_BOUNDARY_ATTENTION_EVENT = "kronosys-planned-boundary-attention";
|
|
3
|
+
|
|
4
|
+
export function dispatchPlannedBoundaryAttention(): void {
|
|
5
|
+
if (typeof globalThis.window === "undefined") {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
globalThis.window.dispatchEvent(new Event(PLANNED_BOUNDARY_ATTENTION_EVENT));
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Détecte le passage simultané d’au moins une tâche vers « minuteur visible en cours »
|
|
3
|
+
* alors qu’il y en avait déjà (ex. une tâche planifiée dont l’heure de début est atteinte).
|
|
4
|
+
*/
|
|
5
|
+
export function detectPlannedBoundaryDisplayConflict(
|
|
6
|
+
prevDisplayRunningIds: Set<string> | null,
|
|
7
|
+
currDisplayRunningIds: Set<string>,
|
|
8
|
+
): { conflict: boolean; newIds: string[]; previousRunnerIds: string[] } {
|
|
9
|
+
if (prevDisplayRunningIds === null) {
|
|
10
|
+
return { conflict: false, newIds: [], previousRunnerIds: [] };
|
|
11
|
+
}
|
|
12
|
+
const newIds = [...currDisplayRunningIds].filter(
|
|
13
|
+
(id) => !prevDisplayRunningIds.has(id),
|
|
14
|
+
);
|
|
15
|
+
if (newIds.length === 0 || prevDisplayRunningIds.size === 0) {
|
|
16
|
+
return { conflict: false, newIds: [], previousRunnerIds: [] };
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
conflict: true,
|
|
20
|
+
newIds,
|
|
21
|
+
previousRunnerIds: [...prevDisplayRunningIds],
|
|
22
|
+
};
|
|
23
|
+
}
|