claude-inbox 0.12.2 → 0.12.3

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: 39ef2bafdac9f7b1c8ba1d4e6f28f5105a5fd5c42320f627caf61fd07f9c314d
4
- data.tar.gz: 0ed5aadb2d02b61b1eabca62a7de74820f7e884f5ffdc6f0bbb68382ba26cc13
3
+ metadata.gz: 58507c555e4ab15701ccf14104a7d365abed00c4f3d4386afba2667b12a6afe1
4
+ data.tar.gz: 21cb5cc8697d843dae5c557b97872ccca09c0148c1c4655bcb8772b15e156d00
5
5
  SHA512:
6
- metadata.gz: 393709c2bc4fc083ded424de49ca3ad102bcf41d75fd72b5c445d8b1f23f7e80f7df0ac1623d4081994e14699168db7c58a2bc64f486b00dd83941c2d691600f
7
- data.tar.gz: fb06b9a05422bff8e3a5474169a11574041219ae700e30a5178a1e507e74df95cd0c069a1c395a070a7f7856bbe6bcdd6380c2a6011a03ff36a1210c05cdae2e
6
+ metadata.gz: 24352714cad8d1974cfe056ed606027aaeac4003e621abb6fc72c76fc9c18dfad052f86ba1bd157dec43cad09415f12db64374aae836d948687eabac645145ea
7
+ data.tar.gz: 7e426498a2aca8f7961c9a8e8e61b68a138b8c6f2d414ac0bb5b8334f61b923966bf1894c994a76bd8880e442c43d32b8f456116ab670a4a70fbfa347bc81262
@@ -50,8 +50,6 @@ module ClaudeInbox
50
50
 
51
51
  def parked? = wake_at == UNTIL_WOKEN
52
52
 
53
- def snoozed_at = @h["snoozed_at"]
54
-
55
53
  def last_state = @h["last_state"]
56
54
 
57
55
  def state_since = @h["state_since"]
@@ -82,6 +80,9 @@ module ClaudeInbox
82
80
  def observe(session, now)
83
81
  now_i = now.to_i
84
82
  if last_state != session.effective_state
83
+ # Only a change of state wakes a snooze early, not trouble on the
84
+ # PR: a session blocked when you snoozed it stays snoozed.
85
+ @h.delete("wake_at") if last_state && session.needs_you?
85
86
  @h["last_state"] = session.effective_state
86
87
  @h["state_since"] = now_i
87
88
  end
@@ -96,7 +97,6 @@ module ClaudeInbox
96
97
  @h["last_seen"] = now_i
97
98
  row = Row.new(session: session, entry: self)
98
99
  @h.delete("wake_at") if row.woken?(now_i)
99
- @h.delete("snoozed_at") unless wake_at
100
100
  @h.delete("settled_at") unless row.hand_settled?
101
101
  @h.delete("acknowledged_at") unless row.acknowledged?
102
102
  @h.delete("revived_at") unless row.revived?
@@ -105,13 +105,11 @@ module ClaudeInbox
105
105
 
106
106
  def snooze(choice, now)
107
107
  @h["wake_at"] = self.class.snooze_until(choice, now)
108
- @h["snoozed_at"] = now.to_i
109
108
  end
110
109
 
111
110
  # Also lifts a hand-settle and a PR settle, so `u` undoes `x` and a resolved PR alike.
112
111
  def wake(now)
113
112
  @h.delete("wake_at")
114
- @h.delete("snoozed_at")
115
113
  @h.delete("settled_at")
116
114
  @h["revived_at"] = now.to_i
117
115
  end
@@ -121,7 +119,6 @@ module ClaudeInbox
121
119
  def settle(now)
122
120
  @h["settled_at"] = now.to_i
123
121
  @h.delete("wake_at")
124
- @h.delete("snoozed_at")
125
122
  @h.delete("revived_at")
126
123
  end
127
124
 
@@ -32,14 +32,9 @@ module ClaudeInbox
32
32
  [label, session.cwd, session.intent, session.summary].any? { |field| field.to_s.downcase.include?(q) }
33
33
  end
34
34
 
35
- # A session already blocked when you snoozed it stays snoozed; one that
36
- # *becomes* blocked or fails afterwards wakes early.
37
- def woken?(now)
38
- return false if wake_at.nil?
39
- return true if session.needs_you? && entry.state_since.to_i > entry.snoozed_at.to_i
40
- return false if parked?
41
- wake_at.to_i <= now.to_i
42
- end
35
+ # Its timer has run out. Becoming blocked or failed wakes it sooner,
36
+ # but only Entry#observe sees that change happen.
37
+ def woken?(now) = !wake_at.nil? && !parked? && wake_at.to_i <= now.to_i
43
38
 
44
39
  def snoozed?(now) = wake_at && !woken?(now)
45
40
 
data/lib/claude_inbox.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClaudeInbox
4
- VERSION = "0.12.2"
4
+ VERSION = "0.12.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude-inbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Byron