@muwi/herdr-app 0.9.0 → 0.10.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/app/muwi/main.js +39 -8
- package/package.json +3 -3
package/app/muwi/main.js
CHANGED
|
@@ -82,8 +82,22 @@ function programIcon(p, size, color) {
|
|
|
82
82
|
* Windows에서는 muwi.cmd를 cmd.exe로 실행한다. sh 스크립트는 Windows에서 바로 실행되지 않는다
|
|
83
83
|
*/
|
|
84
84
|
function runMuwi(args, options) {
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
return exec(...muwiArgv(args), options);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** muwi 명령을 실행할 프로그램과 인자 (새 탭의 터미널에서 실행할 때도 쓴다) */
|
|
89
|
+
function muwiArgv(args) {
|
|
90
|
+
if (appWindow()?.platform === "windows") return ["cmd.exe", ["/d", "/c", `${home()}\\.local\\bin\\muwi.cmd`, ...args]];
|
|
91
|
+
return [`${home()}/.local/bin/muwi`, args];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** 나중에 알리라고 한 새 판 (그 판은 다시 알리지 않는다). 브라우저 저장소를 못 쓰면 이번에만 닫는다 */
|
|
95
|
+
const LATER_KEY = "muwi.update.later";
|
|
96
|
+
function laterVersion() {
|
|
97
|
+
try { return localStorage.getItem(LATER_KEY); } catch { return null; }
|
|
98
|
+
}
|
|
99
|
+
function setLaterVersion(v) {
|
|
100
|
+
try { localStorage.setItem(LATER_KEY, v); } catch { /* 이번에만 닫는다 */ }
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
/** 레이아웃 나무에서 id로 칸을 찾는다 */
|
|
@@ -190,6 +204,8 @@ const SAMPLE = (() => {
|
|
|
190
204
|
{ ...work, work: "shelved", title: "보관한 작업", state: "done", archived: true, past: false, active: [] },
|
|
191
205
|
],
|
|
192
206
|
errors: [],
|
|
207
|
+
// herdr-app check는 견본으로 새 판 배너까지 그려 본다
|
|
208
|
+
update: { current: "0.9.0", latest: "0.10.0", url: "https://github.com/Ssoon-m/muwi/releases/tag/v0.10.0" },
|
|
193
209
|
sessions: [{ key: "s1", terminal: "t1", work: "sample", seenAt: "2026-01-01T00:00:00.000Z" }],
|
|
194
210
|
owners: { t1: "s1" },
|
|
195
211
|
suggest: false,
|
|
@@ -262,6 +278,8 @@ export default class Muwi extends View {
|
|
|
262
278
|
this.applying = false;
|
|
263
279
|
this.bannerNote = null;
|
|
264
280
|
this.bannerClosed = false;
|
|
281
|
+
/** muwi 새 판 안내를 이번에 닫았다 (나중에) */
|
|
282
|
+
this.updateClosed = false;
|
|
265
283
|
/** 그래프 칸의 자리를 바꾸는 중 */
|
|
266
284
|
this.moving = false;
|
|
267
285
|
/** 그래프를 위→아래로 그렸는가 (마지막으로 읽은 것) */
|
|
@@ -1249,11 +1267,14 @@ export default class Muwi extends View {
|
|
|
1249
1267
|
* muwi layout으로 만든 화면인데 Herdr가 업데이트됐으면: 새 모양에 맞추자고
|
|
1250
1268
|
*/
|
|
1251
1269
|
banner(t, variant) {
|
|
1252
|
-
if (
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1270
|
+
if (!this.data) return null;
|
|
1271
|
+
let text = null, act = null, later = null, more = null;
|
|
1272
|
+
// 화면에 대한 안내(Herdr 업데이트, 칸 배치)가 먼저다. 화면이 어긋나는 문제라서. 닫으면 muwi 새 판 안내가 뜬다
|
|
1273
|
+
const tree = checking() || this.bannerClosed ? null : shownLayout();
|
|
1274
|
+
const has = tree ? anyNode(tree, (n) => n?.content?.mod === "muwi") : true;
|
|
1275
|
+
if (checking() || this.bannerClosed) {
|
|
1276
|
+
// 견본과 닫은 뒤에는 화면 안내를 보지 않는다
|
|
1277
|
+
} else if (!has && variant === "full" && this.data.suggest) {
|
|
1257
1278
|
text = "사이드바의 Agents 자리에 작업 목록을 두고, 그래프를 터미널 아래에 고정할 수 있어요. 지금 레이아웃은 그대로 남아요.";
|
|
1258
1279
|
act = { label: "바꾸기", run: (cx) => this.applyLayout(cx, true) };
|
|
1259
1280
|
later = { label: "묻지 않기", run: (cx) => this.stopAsking(cx) };
|
|
@@ -1273,6 +1294,14 @@ export default class Muwi extends View {
|
|
|
1273
1294
|
later = later0;
|
|
1274
1295
|
}
|
|
1275
1296
|
}
|
|
1297
|
+
// muwi 새 판: [업데이트]는 새 탭에서 muwi update를 돌린다 (진행과 오류가 보이게). [나중에]는 그 판만 다시 알리지 않는다
|
|
1298
|
+
const update = this.data.update;
|
|
1299
|
+
if (!text && update?.latest && !this.updateClosed && laterVersion() !== update.latest) {
|
|
1300
|
+
text = `muwi ${update.latest}이 나왔어요 (지금 ${update.current}). 업데이트하면 훅·그래프 칸·커넥터까지 새 판에 맞춰요.`;
|
|
1301
|
+
act = { label: "업데이트", run: () => { const [program, args] = muwiArgv(["update"]); this.openTerminal("muwi-update", [program, ...args], null, "muwi update"); } };
|
|
1302
|
+
more = update.url ? { label: "바뀐 점", run: (cx) => cx.open_url(update.url) } : null;
|
|
1303
|
+
later = { label: "나중에", run: (cx) => { setLaterVersion(update.latest); this.updateClosed = true; cx.notify(); } };
|
|
1304
|
+
}
|
|
1276
1305
|
if (!text) return null;
|
|
1277
1306
|
const button = (id, b, primary) => h_flex().id(id).h(24).px(10).flex_none().items_center().rounded(6)
|
|
1278
1307
|
.bg(primary ? t.accent : t.raised).border_1().border_color(primary ? t.accent : t.border)
|
|
@@ -1282,7 +1311,9 @@ export default class Muwi extends View {
|
|
|
1282
1311
|
.child(b.label);
|
|
1283
1312
|
return h_flex().flex_none().px(14).py(7).gap(10).items_center().bg(t.surface).border_b(1).border_color(t.border)
|
|
1284
1313
|
.child(div().flex_1().min_w(0).text_size(11.5).text_color(this.bannerNote && !this.applying ? t.blocked : t.foreground).child(this.bannerNote ?? text))
|
|
1285
|
-
.when(!this.applying, (el) => el.child(button("banner-act", act, true))
|
|
1314
|
+
.when(!this.applying, (el) => el.child(button("banner-act", act, true))
|
|
1315
|
+
.when(Boolean(more), (el2) => el2.child(button("banner-more", more, false)))
|
|
1316
|
+
.child(button("banner-later", later, false)));
|
|
1286
1317
|
}
|
|
1287
1318
|
|
|
1288
1319
|
/** muwi layout을 실행한다. 터미널 옆에 따로 연 칸이면 바꾼 뒤 그 칸을 닫는다 (같은 그래프가 두 번 보이지 않게) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muwi/herdr-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "muwi를 Herdr 앱에서 보기: 작업 목록과 그래프 칸, 레이아웃",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"./package.json": "./package.json"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@muwi/core": "0.
|
|
16
|
-
"@muwi/herdr": "0.
|
|
15
|
+
"@muwi/core": "0.10.0",
|
|
16
|
+
"@muwi/herdr": "0.10.0"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=24"
|