hiiro 0.1.369 → 0.1.370

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3565b794ff2dd7e61d45810479a5bed58621c54ac4e3afa51f12adeb9626c639
4
- data.tar.gz: 75073d800fee5ab0185eea6062b39961b7f68c4200a1f428f8ac72f090edabd5
3
+ metadata.gz: 032503df05064bda5cc037dd3cd37eccea64c836264d08f40f9a23455d08f8a6
4
+ data.tar.gz: e9b478550d879b3b205e0ca9f04d442782a94c777116eb06901e726c21e785c7
5
5
  SHA512:
6
- metadata.gz: 9435184f96a4b71ea43ecb873180411326aaf5ebb866153748be8f9e5fdbe7605d92c71df4506498029772f510374e91034ce74748663a9d1b4de8ff264d5c17
7
- data.tar.gz: 8a8a5539086877c051ce05639fdb2c72a626c88d92284981c551fff2a3b6a8d6e048250d969b6fedb4e811c720da0a4c58a1e6aa97dddebeba1a478f1c26194e
6
+ metadata.gz: 31f274880fc13eb3448a7970030c78e5d86a1807aff1bdd0ad66f2ffa9c87076f59c174f9d9ac74400a1fc773ad866a5e798f4d3f19e2d977c949ec59ba3514e
7
+ data.tar.gz: 931992993a1505231ae81781a3d8707c40d94c762c3902484c1a1357a5fe02240c616374d64e51622db5be11bae0abd7fc40114f0c994ebd4b4cf18669dd304b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.370] - 2026-09-14
6
+
7
+ ### Added
8
+ - `t ls` marks tasks with an open Herdr workspace with `@` and lists workspaces that belong to no task
9
+
5
10
  ## [0.1.369] - 2026-09-14
6
11
 
7
12
  ### Added
data/docs/t.md CHANGED
@@ -29,7 +29,7 @@ Task names may be `parent/child` for subtasks. `t new NAME` creates exactly `NAM
29
29
 
30
30
  | Command | Behavior |
31
31
  |---|---|
32
- | `t`, `t ls`, `t list` | Lists all tasks alphabetically with open todo counts, e.g. `prez (3)`, plus `next:` and `waiting:` text |
32
+ | `t`, `t ls`, `t list` | Lists all tasks alphabetically with open todo counts, e.g. `prez (3)`, plus `next:` and `waiting:` text. When Herdr is running, tasks whose workspace is open get an `@` marker, and live workspaces that belong to no task are listed afterwards with their IDs |
33
33
  | `t show [TASK]` | Status, home, next action, waiting text, code directory, workspace label, resources, documents, and todos |
34
34
  | `t current [TASK]` | Prints the resolved task name; never saves |
35
35
  | `t use TASK` (alias `pin`) | Saves TASK as the fallback for when no workspace or directory identifies a task |
@@ -40,7 +40,6 @@ class Hiiro
40
40
  add_flag :find, short: :f, desc: 'Choose the task with a fuzzy finder'
41
41
  end
42
42
 
43
- # Exact name, else unique prefix; ambiguous prefixes fail; nil when nothing matches.
44
43
  # Exact name, else unique prefix. An ambiguous prefix opens the fuzzy finder
45
44
  # over the candidates on a TTY and fails otherwise. nil when nothing matches.
46
45
  def lookup_task(reference)
@@ -180,24 +179,43 @@ class Hiiro
180
179
  end
181
180
  end
182
181
 
182
+ # Live Herdr workspaces, or [] when Herdr is not running.
183
+ def live_workspaces
184
+ herdr_client.server_running? ? client.workspaces.to_a : []
185
+ rescue Hiiro::Error
186
+ []
187
+ end
188
+
189
+ # Tasks with open todo counts, an @ marker when the task workspace is open,
190
+ # then any live Herdr workspaces that belong to no task.
183
191
  def list_tasks
184
192
  tasks = Hiiro::TaskRecord.all_as_list
185
- if tasks.empty?
193
+ workspaces = live_workspaces
194
+ labels = tasks.map { |task| workspace_label(task) }
195
+ open_labels = workspaces.map(&:name)
196
+ loose = workspaces.reject { |workspace| labels.include?(workspace.name) }
197
+ if tasks.empty? && loose.empty?
186
198
  puts 'No tasks. Create one with t new NAME.'
187
199
  return
188
200
  end
189
201
  counts = open_todo_counts
202
+ attached = tasks.any? { |task| open_labels.include?(workspace_label(task)) }
190
203
  rows = tasks.map do |task|
191
204
  count = counts[task.name]
192
205
  label = count.zero? ? task.name : "#{task.name} (#{count})"
206
+ label = "#{open_labels.include?(workspace_label(task)) ? '@' : ' '} #{label}" if attached
193
207
  detail = []
194
208
  detail << "next: #{task.next_action}" if task.next_action
195
209
  detail << "waiting: #{task.waiting_on}" if task.waiting_on
196
210
  [label, task.task_status, detail.join(' ')]
197
211
  end
198
- name_col = rows.map { |row| row[0].length }.max
199
- status_col = rows.map { |row| row[1].length }.max
212
+ name_col = rows.map { |row| row[0].length }.max || 0
213
+ status_col = rows.map { |row| row[1].length }.max || 0
200
214
  rows.each { |label, status, detail| puts format("%-#{name_col}s %-#{status_col}s %s", label, status, detail).rstrip }
215
+ return if loose.empty?
216
+ puts unless rows.empty?
217
+ puts 'Workspaces without a task:'
218
+ loose.each { |workspace| puts " #{workspace.name} #{workspace.id}" }
201
219
  end
202
220
 
203
221
 
data/lib/hiiro/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Hiiro
2
- VERSION = "0.1.369"
2
+ VERSION = "0.1.370"
3
3
  SUPPORTED_RUBY_VERSION = ">= 3.2.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.369
4
+ version: 0.1.370
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota