hiiro 0.1.284 → 0.1.286

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: c11001ebe9c6d60bad456719af866219ae6d2c13fde14019cb1a97f05feb4996
4
- data.tar.gz: ae2c4644c8dd9a2dfb0c97fad2ca9870f4a35eddf70ebbc04ba3e40df49e6480
3
+ metadata.gz: d0cdded7b0da39a35ab665c95258d3d7e8e9127d3fb661b067589acb048e4066
4
+ data.tar.gz: 1128b67c50185939fa78a7333e08aef4c02299bbbef192abd02ce4f25b12cb7c
5
5
  SHA512:
6
- metadata.gz: b9b748ffd9b8446976815ae76fd0e6540d6c008397b61d1476ce65d32490a60645c00b1c64c2136e79bb5f287c6adb08c7032eca9547525495d727711e77063d
7
- data.tar.gz: 8e1d1d6fc0361d7ee516ff1e2166b3e4158cd1cf77f6fd273f37f628e1a20f4014b6108efcbd38dc6d9d6d195b9aadcd167f813ae87aa6802096bbfbbde043ca
6
+ metadata.gz: aa7fe9e6d662685567139be2a4df2dfe010a060ba6fe75d828a870fa625db0b718a320586da03da8a1800386fa50c897f050a1a2c75d3f9835f0dd9eaf16005e
7
+ data.tar.gz: d7aee1c4fef76c708c87e08d9b884769a387c7d696a9f5dbe24bafa68e33f6c6da465428fa047935684f11cde415fb5758b75f5f4f258d05246b00e6c98b298f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ```markdown
2
+ ## Unreleased
3
+
4
+ ## [0.1.286] - 2026-03-26
5
+
6
+ ### Fixed
7
+ - **h queue**: When a raw tmux session is selected via fuzzyfinder (`-f`), the task now launches in that session instead of falling back to the default `hq` session. Previously `target_session` was only set when the session was tracked in hiiro's environment model.
8
+
9
+ ## [0.1.285] - 2026-03-26
10
+
11
+ ### Fixed
12
+ - **h notify**: Resolve terminal-notifier path dynamically instead of hardcoding, improving portability across different system configurations
13
+ - **h queue sadd**: Auto-detect current task from environment when no explicit `-f`/`-t` flag given, so frontmatter is populated without needing to pass a flag when already in a task session
14
+ - **h queue sadd**: Fixed task context being lost — was using `exec` which replaced the process; now calls `do_add` directly so `task_info` closure is preserved
15
+
1
16
  ## [0.1.284] - 2026-03-25
2
17
 
3
18
  ### Added
@@ -18,3 +33,4 @@
18
33
  - **TaskManager#send_cd**: Promoted from private to public method
19
34
 
20
35
  ## [0.1.281] - Previous release
36
+ ```
data/bin/h-notify CHANGED
@@ -98,7 +98,8 @@ Hiiro.run(*ARGV, tasks: true) do
98
98
  data[session].unshift(entry)
99
99
  write_log(data)
100
100
 
101
- system('terminal-notifier',
101
+ binpath = `command -v terminal-notifier`
102
+ system(binpath,
102
103
  '-title', @preset[:title],
103
104
  '-message', message,
104
105
  '-sound', @preset[:sound])
data/bin/h-pr CHANGED
@@ -47,10 +47,10 @@ Hiiro.run(*ARGV, plugins: [Pins]) do
47
47
 
48
48
  if result
49
49
  system('say', 'pr good')
50
- system('terminal-notifier', '-title', 'PR Good', '-message', "##{pr_num}: #{pr_title}", '-open', pr_url)
50
+ system('/opt/homebrew/bin/terminal-notifier', '-title', 'PR Good', '-message', "##{pr_num}: #{pr_title}", '-open', pr_url)
51
51
  else
52
52
  system('say', 'pr bad')
53
- system('terminal-notifier', '-title', 'PR Bad', '-message', "##{pr_num}: #{pr_title}", '-open', pr_url)
53
+ system('/opt/homebrew/bin/terminal-notifier', '-title', 'PR Bad', '-message', "##{pr_num}: #{pr_title}", '-open', pr_url)
54
54
  end
55
55
  }
56
56
 
@@ -37,7 +37,7 @@ class Hiiro
37
37
  def show
38
38
  return unless has_cmd?
39
39
 
40
- cmd = ['terminal-notifier']
40
+ cmd = [binpath]
41
41
  cmd += ['-message', options.message] if options.message
42
42
  cmd += ['-title', options.title.tr('()[]', '')] if options.title
43
43
  cmd += ['-open', options.link] if options.link
@@ -53,6 +53,10 @@ class Hiiro
53
53
  end
54
54
  end
55
55
 
56
+ def binpath
57
+ `command -v terminal-notifier`
58
+ end
59
+
56
60
  def has_cmd?
57
61
  system("command -v terminal-notifier &>/dev/null")
58
62
  end
data/lib/hiiro/queue.rb CHANGED
@@ -165,6 +165,9 @@ class Hiiro
165
165
  elsif prompt_obj.session
166
166
  target_session = prompt_obj.session.name
167
167
  working_dir = prompt_obj.session.path || working_dir
168
+ elsif prompt_obj.session_name
169
+ # Raw tmux session (not tracked in hiiro environment) — use name directly
170
+ target_session = prompt_obj.session_name
168
171
  end
169
172
 
170
173
  if prompt_obj.tree
@@ -547,7 +550,7 @@ class Hiiro
547
550
  Tmux.open_session(TMUX_SESSION, start_directory: work_dir)
548
551
  }
549
552
 
550
- do_add = lambda do |args, split: nil|
553
+ do_add = lambda do |args, split: nil, session: false|
551
554
  q.queue_dirs
552
555
  opts = Hiiro::Options.parse(args) do
553
556
  option(:task, short: :t, desc: 'Task name', flag_ifs: [:find])
@@ -570,7 +573,14 @@ class Hiiro
570
573
  args = opts.args
571
574
  ti = q.resolve_task_info(opts, h, task_info)
572
575
 
573
- if opts.session
576
+ # Auto-detect current task from environment when no explicit context given
577
+ if ti.nil? && !opts.find && opts.task.nil?
578
+ env = Environment.current rescue nil
579
+ auto_task = env&.task
580
+ ti = q.task_info_for(auto_task.name) if auto_task
581
+ end
582
+
583
+ if opts.session || session
574
584
  session_name = h.tmux_client.current_session&.name
575
585
  ti = (ti || {}).merge(session_name: session_name) if session_name
576
586
  end
@@ -692,6 +702,12 @@ class Hiiro
692
702
  args = opts.args
693
703
  ti = q.resolve_task_info(opts, h, task_info)
694
704
 
705
+ if ti.nil? && !opts.find && opts.task.nil?
706
+ env = Environment.current rescue nil
707
+ auto_task = env&.task
708
+ ti = q.task_info_for(auto_task.name) if auto_task
709
+ end
710
+
695
711
  if opts.session
696
712
  session_name = h.tmux_client.current_session&.name
697
713
  ti = (ti || {}).merge(session_name: session_name) if session_name
@@ -828,7 +844,7 @@ class Hiiro
828
844
  }
829
845
 
830
846
  h.add_subcmd(:sadd) { |*args|
831
- exec('h', 'queue', 'add', '-s', *args)
847
+ do_add.call(args, session: true)
832
848
  }
833
849
 
834
850
  h.add_subcmd(:tadd) { |*args|
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.284"
2
+ VERSION = "0.1.286"
3
3
  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.284
4
+ version: 0.1.286
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota