Skip to content

fix: align create/update flag surface across issue, issue-template, action, calendar (HULY-8) - #43

Merged
IamCoder18 merged 1 commit into
mainfrom
fix/huly-8-create-update-flag-asymmetries
Aug 10, 2026
Merged

fix: align create/update flag surface across issue, issue-template, action, calendar (HULY-8)#43
IamCoder18 merged 1 commit into
mainfrom
fix/huly-8-create-update-flag-asymmetries

Conversation

@IamCoder18

Copy link
Copy Markdown
Owner

Summary

Closes HULY-8. The original bug report was that huly issue update rejected --label while huly issue create accepted it. After fixing that, I audited every create/update command pair in the CLI (21 surfaces, ~80 flag pairs) and found the same create/update asymmetry class on 6 additional flags across 4 surfaces:

# Surface Missing on update Fix
1 huly issue update --label <l...> wires ops.labels = opts.label (mirrors create)
2 huly issue update --kind <ref> wires ops.kind = await resolveKindByRef(...) (power-user TaskType ref branch from create)
3 huly issue update --body <md>, --body-file <path> readBody()updateMarkup(), body wins over --description (mirrors create descriptionSource = body ?? opts.description)
4 huly issue update --due <iso> ops.dueDate = opts.due === '' ? null : parseDate(...) (empty string clears)
5 huly issue-template update --body-file <path> fs.readFile + ops.description, mirrors createIssueTemplate lines 165-167
6 huly action update --attached-to <ref>, --attached-to-class <class> opts wired but throws clear "delete + recreate" error — true reparenting needs removeCollection + addCollection + WorkSlot migration, which belongs in a dedicated huly action move subcommand (out of scope)
7 huly calendar update --body <md> ops.description = opts.body wins over --description, mirrors createEvent line 629

Also tidies the "nothing to update" error hints and --help text to enumerate all accepted flags, and removes a stale --kind reference in the issue update hint that advertised a flag the CLI never registered (silent typecheck hole).

Out-of-scope follow-up

A separate bug surfaced while filing the scope-expansion comment on HULY-8: huly comment add / update (and likely dm message send, etc.) pass the raw HTML body string as message without going through uploadMarkup, so rich content renders as literal <h1> / <p> / <table> characters. Filed as HULY-20 for separate tracking.

Verification

  • pnpm typecheck
  • pnpm test 43/43 ✅
  • pnpm build
  • All 7 fixes verified end-to-end on the self-hosted test server (http://localhost:7180, test@aaravlabs.com/test) with the huly_v7_test compose stack from ~/apps/huly-selfhost-fork:
    • huly issue update TSK-1 --kind tracker:taskTypes:Issuekind set on issue
    • huly issue update TSK-1 --body-file ./rich.md and --body "<h1>...</h1>..." → both render
    • huly issue update TSK-1 --due 2026-09-15T00:00:00ZdueDate: 1789430400000 ms
    • huly issue-template update <id> --body-file ./tpl.md → description updated from file
    • huly action update <id> --attached-to TSK-1 --attached-to-class tracker:class:Issue → graceful error with workaround
    • huly calendar update <id> --body "<h1>New body</h1><p>From --body flag.</p>" → description set
    • Combined: --title X --label a --label b --due ... --body-file ... → all apply in one call

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@IamCoder18, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 28429694-30c2-4765-89a2-89894c5e9f04

📥 Commits

Reviewing files that changed from the base of the PR and between 11f4be5 and 91231dc.

📒 Files selected for processing (4)
  • packages/cli/src/cli.ts
  • packages/cli/src/resources/issue-template.ts
  • packages/cli/src/resources/issue.ts
  • packages/cli/src/resources/todo.ts
📝 Walkthrough

Walkthrough

The CLI adds body, body-file, kind, due-date, label, and attachment-related update options. Issue and template descriptions support file input and precedence rules. Event updates accept Markdown bodies. Task reparenting requests now return validation guidance.

Changes

CLI update options

Layer / File(s) Summary
Issue update inputs
packages/cli/src/resources/issue.ts, packages/cli/src/cli.ts
Issue updates support body content, body files, task kinds, due dates, and replacement labels.
Description update inputs
packages/cli/src/resources/issue-template.ts, packages/cli/src/resources/calendar.ts, packages/cli/src/cli.ts
Issue-template updates accept --body-file. Event updates accept --body. Validation messages document the new inputs.
Task reparenting validation
packages/cli/src/resources/todo.ts, packages/cli/src/cli.ts
Task update help documents attachment options. Reparenting requests return delete-and-recreate guidance.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the create/update flag alignment, implementation scope, limitations, and verification results.
Title check ✅ Passed The title clearly summarizes the main change: aligning create and update flags across the specified CLI surfaces.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/huly-8-create-update-flag-asymmetries

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/resources/issue-template.ts`:
- Around line 229-233: Update the body-selection logic in the issue template
flow so the opts.body branch checks for undefined rather than truthiness,
preserving an explicitly provided empty string and its precedence over
opts.description. Keep bodyFile handling and the description fallback unchanged.

In `@packages/cli/src/resources/issue.ts`:
- Around line 1157-1167: Move the `updateMarkup` call in the issue update flow
so body input is resolved and all `--kind`/`--due` validation completes before
any write. In the surrounding update command, return on `opts.dryRun` before
invoking `updateMarkup` or other mutations, while preserving the existing body
handling and validation behavior.

In `@packages/cli/src/resources/todo.ts`:
- Around line 567-581: Move the unsupported reparenting validation for
opts.attachedTo and opts.attachedToClass before the connectCli call in the
update flow. Keep the existing CliError, exit code, and delete-and-recreate
guidance unchanged, and remove the later duplicate check so invalid reparenting
requests fail before workspace or platform setup.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f69b9181-f1ad-470e-bae3-9b56c7910ddb

📥 Commits

Reviewing files that changed from the base of the PR and between da07208 and 11f4be5.

📒 Files selected for processing (5)
  • packages/cli/src/cli.ts
  • packages/cli/src/resources/calendar.ts
  • packages/cli/src/resources/issue-template.ts
  • packages/cli/src/resources/issue.ts
  • packages/cli/src/resources/todo.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Kilo Code Review
🧰 Additional context used
🪛 ast-grep (0.45.0)
packages/cli/src/resources/issue-template.ts

[warning] 230-230: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.readFile(opts.bodyFile, 'utf8')
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(detect-non-literal-fs-filename-typescript)

🪛 GitHub Actions: CI / 0_Build, format, lint, typecheck, test.txt
packages/cli/src/cli.ts

[error] 1-1: oxfmt formatting check failed. Run 'oxfmt' without '--check' to fix formatting issues.

🪛 GitHub Actions: CI / Build, format, lint, typecheck, test
packages/cli/src/cli.ts

[error] 1-1: oxfmt formatting check failed. Run 'pnpm format:check' without '--check' or apply the formatter to fix this file.

🔇 Additional comments (5)
packages/cli/src/resources/todo.ts (1)

555-556: LGTM!

packages/cli/src/resources/issue.ts (1)

1083-1088: LGTM!

Also applies to: 1180-1196, 1206-1206

packages/cli/src/cli.ts (1)

966-988: LGTM!

Also applies to: 1337-1337, 2140-2156, 2572-2572

packages/cli/src/resources/issue-template.ts (1)

207-207: LGTM!

Also applies to: 234-239

packages/cli/src/resources/calendar.ts (1)

701-701: LGTM!

Also applies to: 724-727, 744-744

Comment thread packages/cli/src/resources/issue-template.ts
Comment thread packages/cli/src/resources/issue.ts Outdated
Comment thread packages/cli/src/resources/todo.ts Outdated
Comment thread packages/cli/src/cli.ts
.addHelpText(
'after',
`
Note on --attached-to / --attached-to-class:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Help text is misleading — it claims reparenting is supported, then immediately says it isn't exposed.

The first sentence ("Reparenting is supported via 'removeCollection' on the old parent + 'addCollection' on the new parent…") reads like a feature description, but the CLI just throws "reparenting an action via update is not yet supported" whenever these flags are passed. The WorkSlot preservation and cascade semantics are implementation details the user can't act on. Consider rewriting to lead with the rejection: e.g., "Reparenting is not supported. To move an action, delete it and recreate it under the new parent. (The new action will receive a new _id; downstream references will break.)"

Comment thread packages/cli/src/cli.ts Outdated
.option('--task-type <name|id>')
.option('--kind <ref>', 'TaskType ref (e.g. tracker:taskTypes:Issue); power-user bypass of name lookup')
.option('--due <iso>', 'ISO 8601 e.g. 2026-07-01T14:00:00Z')
.option('--label <l...>', 'repeatable: --label bug --label auth (replaces existing labels)')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: --label <l...> requires at least one value, so users cannot clear all labels via this flag — they have to know to use --set labels=null or --unset labels. The help text mentions the additive subcommands but doesn't mention how to clear all labels. Either document the limitation in the option description ("use --unset labels to clear") or add support for --label "" (or an explicit --clear-labels) to set ops.labels = [].

}
// HULY-8: --label replaces the labels array, matching issue create.
// Use 'issue label add' / 'issue label remove' for additive/subtractive
// semantics — those go through the TagReference collection, not this

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: --label "" (single empty string) passes through as opts.label = [''] and this branch fires, so ops.labels = [''] is sent to the server — silently creating an empty-string label on the issue. Add a guard that rejects empty/whitespace-only label values, e.g. const cleaned = opts.label?.filter((l) => l.trim().length > 0); if (cleaned && cleaned.length > 0) ops.labels = cleaned.

Comment thread packages/cli/src/resources/issue.ts Outdated
// Use 'issue label add' / 'issue label remove' for additive/subtractive
// semantics — those go through the TagReference collection, not this
// direct field set.
if (opts.label !== undefined) ops.labels = opts.label

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: No validation that the supplied labels exist in the workspace. A typo like --label bugx will silently set the issue's labels to a non-existent tag, mirroring the create-time gap (so it's consistent) but worth flagging — consider resolving label names against the workspace's TagReference set and throwing on unknown values, or at least warning.

const ops: Record<string, unknown> = {}
if (opts.title) ops.title = opts.title
if (opts.description !== undefined) ops.description = opts.description
// HULY-8: --body takes precedence over --description, mirroring createEvent

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: ops.description = opts.body writes raw markup text directly to the event, which is exactly the bug pattern called out in HULY-20 (per the PR description, comment add/update does the same and renders literal <h1>/<p> tags). The issue update path in this PR correctly routes through updateMarkup (packages/cli/src/resources/issue.ts:1157) so the description field gets a MarkupBlobRef. Calendar events should follow the same pattern — route --body and --description through uploadMarkup/updateMarkup so rich content renders properly in the event UI.

if (opts.body) ops.description = opts.body
// HULY-8: --body-file mirrors the file-read path used by createIssueTemplate
// (lines 165-167). --body still wins if both are passed (matches create).
if (opts.bodyFile) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Same HULY-20 bug pattern — ops.description = (await fs.readFile(opts.bodyFile, 'utf8')).trim() writes raw markup text directly. The pre-existing --body path on this same function had the same bug, so the new --body-file path is at least consistent. But neither is correct: the issue-template's description field expects a MarkupBlobRef, so both --body and --body-file on update should call uploadMarkup (or updateMarkup) and store the returned ref, mirroring how updateIssue handles --body.

@kilo-code-bot

kilo-code-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Both previously reported SUGGESTIONs from commit 3598506 are resolved by this incremental commit (91231dc):

  • packages/cli/src/resources/issue.ts:91-106readBody now uses !== undefined checks for body, bodyFile, and their ambiguity guard. Verified --body "" returns "" (not undefined), and downstream markupBody = body ?? opts.description correctly resolves to ""updateMarkup is called → empty prosemirror doc is sent. Verified createIssue (line 783) path is unaffected because the existing descriptionSource.length > 0 guard at line 794 already skips empty body uploads on create.
  • packages/cli/src/cli.ts:970-973--due help text now documents the empty-string-clears behavior, mirroring the --label pattern on line 976.

No new issues introduced in the incremental diff (2 changed files, ~12 changed lines).

Files Reviewed (2 files)
  • packages/cli/src/cli.ts
  • packages/cli/src/resources/issue.ts
Previous Review Summaries (2 snapshots, latest commit 3598506)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 3598506)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/cli/src/resources/issue.ts 1156 readBody (issue.ts:91-101) uses truthy checks, so --body "" is silently a no-op on issue update — asymmetric with the issue-template update fix in this PR. Either update if (opts.body) to if (opts.body !== undefined) or document the asymmetry.
packages/cli/src/cli.ts 970 --due <iso> help text only documents the ISO format; the empty-string-clears behavior implemented at issue.ts:1170 is undocumented. Mirror the --label help pattern (line 973).
Previously Reported Issues (re-verified against 3598506)
File Line Status Note
packages/cli/src/cli.ts 2151 ✅ Resolved Help text now leads with "rejected" and includes the delete+recreate _id caveat.
packages/cli/src/resources/issue.ts 1174 ✅ Resolved --label "" and whitespace-only entries are filtered; all-blank labels set ops.labels = [].
packages/cli/src/cli.ts 971 ✅ Resolved --label help now documents --unset labels for clearing all labels.
packages/cli/src/resources/issue-template.ts 233 ✅ Resolved --body "" now uses !== undefined check (CodeRabbit fix).
packages/cli/src/resources/issue.ts 1167 ✅ Resolved updateMarkup moved after the dry-run guard; --body X --dry-run no longer persists.
packages/cli/src/resources/todo.ts 581 ✅ Resolved Unsupported-reparenting check moved before connectCli.
packages/cli/src/resources/calendar.ts 724 ⏸️ Deferred HULY-20 (raw markup pattern, filed separately).
packages/cli/src/resources/issue-template.ts 232 ⏸️ Deferred HULY-20 (raw markup pattern, filed separately).
packages/cli/src/resources/issue.ts 1196 ⏸️ Deferred Label existence validation; consistent with create-time gap, out of scope.
Files Reviewed (5 files)
  • packages/cli/src/cli.ts - 1 issue
  • packages/cli/src/resources/calendar.ts - 0 issues (HULY-20 deferred)
  • packages/cli/src/resources/issue-template.ts - 0 issues (HULY-20 deferred)
  • packages/cli/src/resources/issue.ts - 1 issue
  • packages/cli/src/resources/todo.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 11f4be5)

Status: 6 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 4
Issue Details (click to expand)

WARNING

File Line Issue
packages/cli/src/cli.ts 2151 action update help text says "Reparenting is supported via…" then "not yet exposed here" — the CLI just throws; lead with the rejection and warn that delete+recreate issues a new _id.
packages/cli/src/resources/issue.ts 1194 --label "" passes through as opts.label = [''] and silently sets an empty-string label on the issue; filter empty/whitespace values before assigning.

SUGGESTION

File Line Issue
packages/cli/src/cli.ts 971 --label <l...> can't clear all labels (requires ≥1 value); document --unset labels or accept --label "".
packages/cli/src/resources/issue.ts 1196 No validation that supplied labels exist in the workspace — typos silently create bogus tags.
packages/cli/src/resources/calendar.ts 724 New --body writes raw markup to ops.description (HULY-20 pattern); should route through uploadMarkup/updateMarkup like updateIssue does.
packages/cli/src/resources/issue-template.ts 229 New --body-file writes raw markup to ops.description (HULY-20 pattern); both --body and --body-file should produce a MarkupBlobRef.
Files Reviewed (5 files)
  • packages/cli/src/cli.ts - 2 issues
  • packages/cli/src/resources/calendar.ts - 1 issue
  • packages/cli/src/resources/issue-template.ts - 1 issue
  • packages/cli/src/resources/issue.ts - 2 issues
  • packages/cli/src/resources/todo.ts - 0 issues (early-throw helper is well-scoped; no bugs found in the changed lines)

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 32.4K · Output: 3.8K · Cached: 157.2K

@IamCoder18
IamCoder18 force-pushed the fix/huly-8-create-update-flag-asymmetries branch from 11f4be5 to 3598506 Compare August 10, 2026 23:37
@IamCoder18

Copy link
Copy Markdown
Owner Author

Review feedback addressed (amended into commit 3598506)

CI now passes (was failing on oxfmt --check). Review fixes applied:

CodeRabbit inline comments

Location Issue Fix
packages/cli/src/resources/issue-template.ts:233 --body "" ignored by truthiness check Test opts.body !== undefined instead, so an explicit empty body clears the description
packages/cli/src/resources/issue.ts:1167 updateMarkup ran before dry-run check (data integrity: --body X --dry-run persisted) Resolve markupBody early but defer updateMarkup until after the dry-run guard. --kind/--due validation intentionally kept where it is (matches existing resolveStatus/resolvePriority pattern)
packages/cli/src/resources/todo.ts:581 Unsupported-reparenting check ran after connectCli, hiding the clear error behind workspace-setup failures Moved the check before connectCli

Kilo Code Review warnings + suggestions

Location Issue Fix
packages/cli/src/cli.ts:2151 Misleading help text said reparenting "is supported" then immediately said it isn't Rewritten to lead with rejection + clear "delete + recreate" workaround + caveat that the new task gets a different _id
packages/cli/src/resources/issue.ts:1194 --label "" silently created an empty-string label Filter empty/whitespace entries; if all entries are blank, set ops.labels = [] to honor the "clear all" intent rather than silently no-op
packages/cli/src/cli.ts:971 --label required ≥1 value with no documented way to clear all Help now reads: --label <l...> ... (replaces existing labels); use --unset labels to clear all
packages/cli/src/resources/calendar.ts:724 --body writes raw markup (HULY-20 pattern) Out of scope — HULY-20 already filed for separate tracking per PR description
packages/cli/src/resources/issue-template.ts:229 --body-file writes raw markup (HULY-20 pattern) Out of scope — HULY-20
packages/cli/src/resources/issue.ts:1196 No validation that labels exist in workspace Deferred — consistent with create-time gap, would need a separate refactor of both issue create and issue update to look up TagReference set and reject unknown names

Verification

  • pnpm typecheck
  • pnpm test 43/43 ✅
  • pnpm oxlint
  • pnpm format:check ✅ (was the CI failure)
  • GitHub Actions CI ✅ (run 31443091101)

Branch force-updated; ready for re-review.

// after the dry-run guard below — otherwise `--body ... --dry-run` would
// persist. The --kind / --due resolve calls are intentionally kept where
// they are (matches the existing resolveStatus / resolvePriority pattern).
const body = await readBody(opts)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: --body "" is silently a no-op on issue update — asymmetric with the issue-template update fix in this PR.

readBody (issue.ts:91-101) uses truthy checks (if (opts.body) return opts.body), so --body "" makes readBody return undefined. Then markupBody = body ?? opts.description resolves to opts.description (also undefined unless the user passed --description), markupRequested = false, and updateMarkup is never called.

Meanwhile, on huly issue-template update (issue-template.ts:235 after this PR's CodeRabbit-driven fix), else if (opts.body !== undefined) ops.description = opts.body correctly clears the description. The two update commands now have inconsistent --body "" behavior, even though both got --body/--body-file parity in the same PR.

Either mirror the fix by changing readBody's if (opts.body) to if (opts.body !== undefined) (one-line change, also fixes the same latent issue on createIssue), or document the asymmetry. The downstream updateMarkup already handles empty body by sending EMPTY_PROSEMIRROR_DOC, so the fix is safe.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread packages/cli/src/cli.ts Outdated
.option('--body-file <path>')
.option('--task-type <name|id>')
.option('--kind <ref>', 'TaskType ref (e.g. tracker:taskTypes:Issue); power-user bypass of name lookup')
.option('--due <iso>', 'ISO 8601 e.g. 2026-07-01T14:00:00Z')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: --due <iso> help text doesn't mention that empty string clears the existing due date — the only way to clear dueDate on update.

The implementation at issue.ts:1170 explicitly handles this case (opts.due === '' ? null : parseDate(opts.due, '--due')), but the option description only documents the ISO format. Users have no way to discover the clear-via-empty-string convention. Mirror the documentation pattern used for --label on line 973 ("use --unset labels to clear all"):

Suggested change
.option('--due <iso>', 'ISO 8601 e.g. 2026-07-01T14:00:00Z')
.option('--due <iso>', "ISO 8601 e.g. 2026-07-01T14:00:00Z; pass --due '' to clear the existing due date")

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

…ction, calendar (HULY-8)

`huly issue update` was missing several flags that `huly issue create` accepts
(`--label`, `--kind`, `--body`, `--body-file`, `--due`). The same pattern
appeared in three other write-asymmetric surfaces:

  - `huly issue-template update` was missing `--body-file`
  - `huly action update` was missing `--attached-to` / `--attached-to-class`
  - `huly calendar update` was missing `--body`

Each fix mirrors the corresponding `create` handler:

  * `--label` on issue update: replaces the labels array, matching create
  * `--kind` on issue update: power-user TaskType ref, skipping name lookup
  * `--body` / `--body-file` on issue update: uploadMarkup path, body
    takes precedence over --description (mirrors createIssue descriptionSource)
  * `--due` on issue update: empty string clears, ISO string sets
  * `--body-file` on issue-template update: file-read path matching create
  * `--attached-to` / `--attached-to-class` on action update: wired but
    rejected with a clear 'delete + recreate' workaround, since true
    reparenting needs removeCollection + addCollection + WorkSlot migration
    (out of scope; a dedicated 'action move' subcommand is the right fix)
  * `--body` on calendar update: body wins over --description, matching
    createEvent

Also tidies the 'nothing to update' error hints and help text to enumerate
all accepted flags, removing the stale `--kind` reference in the issue
update hint that advertised a flag the CLI never registered.

Verified on http://localhost:7180 with credentials test@aaravlabs.com/test
against the `huly_v7_test` compose stack.
@IamCoder18
IamCoder18 force-pushed the fix/huly-8-create-update-flag-asymmetries branch from 3598506 to 91231dc Compare August 10, 2026 23:52
@IamCoder18

Copy link
Copy Markdown
Owner Author

Two new review issues addressed (amended into commit 91231dc)

  1. packages/cli/src/resources/issue.ts:1156--body "" was silently a no-op on issue update. Root cause: readBody() (issue.ts:91) used a truthy check (if (opts.body) return opts.body) so an explicit empty string fell through and body ?? opts.description then used opts.description. Fixed by changing readBody to test opts.body !== undefined (and symmetrically for bodyFile). Verified end-to-end: after --body "", issue get --raw-markup returns {"type":"doc","content":[]} (the empty prosemirror doc).

  2. packages/cli/src/cli.ts:970--due <iso> help didn't mention that empty string clears. Help now reads: ISO 8601 e.g. 2026-07-01T14:00:00Z; pass an empty string ("") to clear an existing due date. Verified --due "" sets dueDate: null.

Both fixes verified on the test server (localhost:7180); test artifacts cleaned; compose stack brought down. CI re-running on the amended commit.

@IamCoder18
IamCoder18 merged commit 75a7c26 into main Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant