@taskmark/ui 0.2.5 → 0.3.0
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 +47 -7
- package/app/board/page.tsx +3 -272
- package/app/page.tsx +14 -14
- package/app/setup/actions.ts +4 -4
- package/app/setup/page.tsx +12 -4
- package/bin/lib/resolve-board.mjs +50 -1
- package/bin/taskmark.js +154 -32
- package/components/board/board-screen.tsx +285 -0
- package/components/board/epic-list.tsx +2 -2
- package/components/board/overall-work-items-list.tsx +1 -1
- package/components/board/story-list.tsx +1 -1
- package/dist/prod-next/BUILD_ID +1 -1
- package/dist/prod-next/app-path-routes-manifest.json +2 -2
- package/dist/prod-next/build-manifest.json +3 -3
- package/dist/prod-next/prerender-manifest.json +3 -3
- package/dist/prod-next/react-loadable-manifest.json +2 -2
- package/dist/prod-next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/prod-next/server/app/_global-error.html +1 -1
- package/dist/prod-next/server/app/_global-error.rsc +1 -1
- package/dist/prod-next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/prod-next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/prod-next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/prod-next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/prod-next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/prod-next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/prod-next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/prod-next/server/app/_not-found.html +1 -1
- package/dist/prod-next/server/app/_not-found.rsc +1 -1
- package/dist/prod-next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/prod-next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/prod-next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/prod-next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/prod-next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/prod-next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/prod-next/server/app/api/taskmark-reload/route.js +1 -1
- package/dist/prod-next/server/app/board/page.js +2 -50
- package/dist/prod-next/server/app/board/page.js.nft.json +1 -1
- package/dist/prod-next/server/app/board/page_client-reference-manifest.js +1 -1
- package/dist/prod-next/server/app/page.js +2 -2
- package/dist/prod-next/server/app/page.js.nft.json +1 -1
- package/dist/prod-next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/prod-next/server/app/setup/page.js +2 -2
- package/dist/prod-next/server/app/setup/page.js.nft.json +1 -1
- package/dist/prod-next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/dist/prod-next/server/app-paths-manifest.json +2 -2
- package/dist/prod-next/server/chunks/192.js +49 -0
- package/dist/prod-next/server/chunks/463.js +1 -0
- package/dist/prod-next/server/chunks/487.js +1 -0
- package/dist/prod-next/server/chunks/54.js +19 -0
- package/dist/prod-next/server/chunks/57.js +8 -19
- package/dist/prod-next/server/middleware-build-manifest.js +1 -1
- package/dist/prod-next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/prod-next/server/pages/404.html +1 -1
- package/dist/prod-next/server/pages/500.html +1 -1
- package/dist/prod-next/server/server-reference-manifest.js +1 -1
- package/dist/prod-next/server/server-reference-manifest.json +1 -1
- package/dist/prod-next/static/chunks/636-626c380f021b95c8.js +1 -0
- package/dist/prod-next/static/chunks/909.932f2af3be7f1e89.js +1 -0
- package/dist/prod-next/static/chunks/app/_global-error/page-a1e3320be3da9be1.js +1 -0
- package/dist/prod-next/static/chunks/app/api/taskmark-reload/route-a1e3320be3da9be1.js +1 -0
- package/dist/prod-next/static/chunks/app/board/page-636f60191db62f52.js +1 -0
- package/dist/prod-next/static/chunks/app/page-562a33b50da7665b.js +1 -0
- package/dist/prod-next/static/chunks/app/setup/page-4cf527b758b1d51e.js +1 -0
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/app-error-a1e3320be3da9be1.js +1 -0
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/forbidden-a1e3320be3da9be1.js +1 -0
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/not-found-a1e3320be3da9be1.js +1 -0
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/unauthorized-a1e3320be3da9be1.js +1 -0
- package/dist/prod-next/static/chunks/webpack-d33b8a6298c94a64.js +1 -0
- package/dist/public/taskmark-snapshot.json +1 -1
- package/lib/taskmark/autoconfig.ts +54 -3
- package/lib/taskmark/discover.ts +2 -1
- package/lib/taskmark/list-view-mode.ts +1 -1
- package/lib/taskmark/workspace-mode.ts +24 -0
- package/lib/taskmark/workspace.ts +5 -2
- package/package.json +4 -2
- package/public/taskmark-snapshot.json +1 -1
- package/scripts/build-static.mjs +61 -3
- package/dist/prod-next/server/chunks/318.js +0 -1
- package/dist/prod-next/server/chunks/490.js +0 -8
- package/dist/prod-next/server/chunks/616.js +0 -1
- package/dist/prod-next/server/chunks/708.js +0 -1
- package/dist/prod-next/static/chunks/51.e9139a9ea6eb36b9.js +0 -1
- package/dist/prod-next/static/chunks/app/_global-error/page-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/app/api/taskmark-reload/route-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/app/board/page-cd1d9be0c0127225.js +0 -1
- package/dist/prod-next/static/chunks/app/page-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/app/setup/page-c3003359e8becc84.js +0 -1
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/app-error-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/forbidden-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/not-found-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/next/dist/client/components/builtin/unauthorized-d34451c04262dd7d.js +0 -1
- package/dist/prod-next/static/chunks/webpack-bfe8992962004e2b.js +0 -1
- /package/dist/prod-next/static/{wbcgYS3Jw87KqhnA9ttOL → yyRnYAFQrJjF5_b5ZIeqh}/_buildManifest.js +0 -0
- /package/dist/prod-next/static/{wbcgYS3Jw87KqhnA9ttOL → yyRnYAFQrJjF5_b5ZIeqh}/_ssgManifest.js +0 -0
|
@@ -7,8 +7,13 @@ import {
|
|
|
7
7
|
discoverTaskmarkProjects,
|
|
8
8
|
} from "@/lib/taskmark/discover"
|
|
9
9
|
import type { DiscoveredProject } from "@/lib/taskmark/types"
|
|
10
|
+
import { isWorkspaceMode } from "@/lib/taskmark/workspace-mode"
|
|
10
11
|
|
|
11
|
-
export type AutoconfigSource =
|
|
12
|
+
export type AutoconfigSource =
|
|
13
|
+
| "env_board"
|
|
14
|
+
| "env_master"
|
|
15
|
+
| "cwd"
|
|
16
|
+
| "sibling"
|
|
12
17
|
|
|
13
18
|
export type AutoconfigWorkspace = {
|
|
14
19
|
source: AutoconfigSource
|
|
@@ -84,13 +89,54 @@ export function cwdCandidates(): string[] {
|
|
|
84
89
|
return out
|
|
85
90
|
}
|
|
86
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Multi-git: product repo beside `<parentBasename>-taskmark` (or unique sibling).
|
|
94
|
+
*/
|
|
95
|
+
export function resolveSiblingDedicatedBoard(fromDir: string): string | null {
|
|
96
|
+
const resolved = path.resolve(fromDir)
|
|
97
|
+
const parent = path.dirname(resolved)
|
|
98
|
+
const parentName = path.basename(parent)
|
|
99
|
+
const preferred = path.join(parent, `${parentName}-taskmark`)
|
|
100
|
+
const preferredBoard = resolveBoardAtPath(preferred)
|
|
101
|
+
if (preferredBoard) return preferredBoard
|
|
102
|
+
|
|
103
|
+
let entries: fs.Dirent[]
|
|
104
|
+
try {
|
|
105
|
+
entries = fs.readdirSync(parent, { withFileTypes: true })
|
|
106
|
+
} catch {
|
|
107
|
+
return null
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const boards: string[] = []
|
|
111
|
+
for (const entry of entries) {
|
|
112
|
+
if (!entry.isDirectory() || !entry.name.endsWith("-taskmark")) continue
|
|
113
|
+
const board = resolveBoardAtPath(path.join(parent, entry.name))
|
|
114
|
+
if (board) boards.push(board)
|
|
115
|
+
}
|
|
116
|
+
if (boards.length === 0) return null
|
|
117
|
+
if (boards.length === 1) return boards[0]
|
|
118
|
+
|
|
119
|
+
const cwdBase = path.basename(resolved)
|
|
120
|
+
const parts = cwdBase.split("-").filter(Boolean)
|
|
121
|
+
for (let i = parts.length - 1; i >= 1; i--) {
|
|
122
|
+
const prefix = parts.slice(0, i).join("-")
|
|
123
|
+
const hit = boards.find((b) => path.basename(b) === `${prefix}-taskmark`)
|
|
124
|
+
if (hit) return hit
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return null
|
|
128
|
+
}
|
|
129
|
+
|
|
87
130
|
/**
|
|
88
131
|
* Resolve a zero-config workspace without cookies.
|
|
89
132
|
*
|
|
90
|
-
* Precedence: TASKMARK_BOARD → TASKMARK_MASTER → cwd layouts.
|
|
91
|
-
* Returns null when nothing valid is found (caller should use cookie setup)
|
|
133
|
+
* Precedence: TASKMARK_BOARD → TASKMARK_MASTER → cwd layouts → sibling *-taskmark.
|
|
134
|
+
* Returns null when nothing valid is found (caller should use cookie setup),
|
|
135
|
+
* or when workspace mode asked for the multi-project picker instead of a bind.
|
|
92
136
|
*/
|
|
93
137
|
export function resolveAutoconfigWorkspace(): AutoconfigWorkspace | null {
|
|
138
|
+
if (isWorkspaceMode()) return null
|
|
139
|
+
|
|
94
140
|
const boardEnv = readEnvPath("TASKMARK_BOARD")
|
|
95
141
|
if (boardEnv) {
|
|
96
142
|
const board = resolveBoardAtPath(boardEnv)
|
|
@@ -114,5 +160,10 @@ export function resolveAutoconfigWorkspace(): AutoconfigWorkspace | null {
|
|
|
114
160
|
if (board) return workspaceFromBoard(board, "cwd")
|
|
115
161
|
}
|
|
116
162
|
|
|
163
|
+
for (const candidate of cwdCandidates()) {
|
|
164
|
+
const sibling = resolveSiblingDedicatedBoard(candidate)
|
|
165
|
+
if (sibling) return workspaceFromBoard(sibling, "sibling")
|
|
166
|
+
}
|
|
167
|
+
|
|
117
168
|
return null
|
|
118
169
|
}
|
package/lib/taskmark/discover.ts
CHANGED
|
@@ -129,7 +129,8 @@ export function discoverTaskmarkProjects(
|
|
|
129
129
|
for (const entry of entries) {
|
|
130
130
|
if (!entry.isDirectory()) continue
|
|
131
131
|
if (shouldSkipDir(entry.name)) continue
|
|
132
|
-
|
|
132
|
+
// A real `<dir>/taskmark` board already returned above, so a folder named
|
|
133
|
+
// "taskmark" here is an ordinary directory (e.g. a workspace root).
|
|
133
134
|
visit(path.join(dir, entry.name), depth + 1)
|
|
134
135
|
}
|
|
135
136
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import path from "node:path"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Workspace (multi-project) mode — `taskmark` / `taskmark open` / `--workspace`.
|
|
5
|
+
*
|
|
6
|
+
* Board-bound commands (`serve`, `dev`) auto-config a single board from env or
|
|
7
|
+
* cwd. Workspace mode turns that off so the cookie-based master folders and the
|
|
8
|
+
* app bar project picker drive which board is shown.
|
|
9
|
+
*/
|
|
10
|
+
export function isWorkspaceMode(): boolean {
|
|
11
|
+
const raw = process.env.TASKMARK_WORKSPACE?.trim().toLowerCase()
|
|
12
|
+
return raw === "1" || raw === "true"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Directory `taskmark` was invoked from; seeds the setup wizard input. */
|
|
16
|
+
export function workspaceStartPath(): string {
|
|
17
|
+
for (const raw of [
|
|
18
|
+
process.env.TASKMARK_WORKSPACE_ROOT,
|
|
19
|
+
process.env.INIT_CWD,
|
|
20
|
+
]) {
|
|
21
|
+
if (raw && raw.trim()) return path.resolve(raw.trim())
|
|
22
|
+
}
|
|
23
|
+
return ""
|
|
24
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
resolveAutoconfigWorkspace,
|
|
3
|
+
type AutoconfigSource,
|
|
4
|
+
} from "@/lib/taskmark/autoconfig"
|
|
2
5
|
import { discoverTaskmarkProjectsFromMasters } from "@/lib/taskmark/discover"
|
|
3
6
|
import { validateMasterFolder } from "@/lib/taskmark/validate"
|
|
4
7
|
import type { DiscoveredProject } from "@/lib/taskmark/types"
|
|
@@ -7,7 +10,7 @@ export type ConfiguredWorkspace = {
|
|
|
7
10
|
masters: string[]
|
|
8
11
|
projects: DiscoveredProject[]
|
|
9
12
|
/** How the workspace was resolved; null means cookie/manual masters. */
|
|
10
|
-
source:
|
|
13
|
+
source: AutoconfigSource | "cookies" | null
|
|
11
14
|
/** When true, UI is locked to the auto-bound board(s) (skip setup). */
|
|
12
15
|
autoconfig: boolean
|
|
13
16
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskmark/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Taskmark board UI — run globally for setup/project picker, or install in a board folder to open that board with `npx taskmark`",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"dev": "node ./bin/taskmark.js dev",
|
|
36
|
+
"dev:workspace": "node ./bin/taskmark.js dev --workspace",
|
|
37
|
+
"open": "node ./bin/taskmark.js open",
|
|
36
38
|
"build": "next build --webpack && node scripts/prepare-standalone.mjs",
|
|
37
39
|
"build:static": "node scripts/build-static.mjs",
|
|
38
40
|
"start": "next start",
|