cardinal-ai 0.2.19 → 0.2.20

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: 0a2b2e4142b5c9c54b8d320d6e36c17832c2bfb69996fce034be52ee2b4849fe
4
- data.tar.gz: 266f7d5ce81b724643c600582ce744ed48cb8bc24606d98c3b16bc21b515b673
3
+ metadata.gz: f598747488ba4b10c50dde4edca8d8d1bbad8561966950f8257d2d36d6855925
4
+ data.tar.gz: c197838268819214088cde422122e748684b6b3d0607f96eae69b5b140895b2b
5
5
  SHA512:
6
- metadata.gz: 94358996801e25b84e34564156a362d3963bf4941c0d195215cf19aee86fd510f4d22ee1ecd3adf4500d2846c811f7df653d808cbceca8c028c38e678e4a3337
7
- data.tar.gz: 86deb643dae9b203eeb462e0c62c30c3bb7aa85b648b89ef7c53b8436f3a14af013fa231384e1e5f28a74aa0be0e9bab410b22e820fd500af4fd4c4e0ec5ff42
6
+ metadata.gz: abd46dd6087001a326abf6afa1d8530c66f445758d23a5646731482c5c7c246bd4bca345732518cf6408665f4c35ccc4ddaa49fd8dae1467ef9f175fb7b18890
7
+ data.tar.gz: c90684313c0e3a93125e6d8f2fa419013d4ed451e7cb255b74adf041998b5b8e28edcb13974cd5b7d88831a2641a41e36b7f924cd5c3114f5d6da34aa9b272bc
data/app/models/board.rb CHANGED
@@ -4,7 +4,7 @@ class Board < ApplicationRecord
4
4
  # by install_default_columns! (ids don't exist until creation).
5
5
  DEFAULT_COLUMNS = [
6
6
  { name: "Tasks", archetype: "inbox",
7
- policy: { "plan_approval" => false,
7
+ policy: { "plan_approval" => false, "arrivals" => "top",
8
8
  "accepts_from_names" => ["Planning", "Review", "QA", "Done"] } },
9
9
  { name: "Planning", archetype: "planning",
10
10
  policy: { "ai" => true, "model" => "claude-haiku-4-5-20251001", "plan_approval" => false,
data/app/models/card.rb CHANGED
@@ -169,7 +169,16 @@ class Card < ApplicationRecord
169
169
 
170
170
  def assign_number_and_position
171
171
  self.number ||= (board.cards.maximum(:number) || 0) + 1
172
- self.position ||= (column.cards.maximum(:position) || -1) + 1
172
+ return if position.present?
173
+
174
+ # Creation honors the column's arrivals policy, same as drags do — a
175
+ # column set to "top" puts newborns first (freshest work up top).
176
+ if column&.arrivals == "top"
177
+ column.cards.update_all("position = position + 1")
178
+ self.position = 0
179
+ else
180
+ self.position = (column.cards.maximum(:position) || -1) + 1
181
+ end
173
182
  end
174
183
 
175
184
  def status_legal_for_column
@@ -1,3 +1,3 @@
1
1
  module Cardinal
2
- VERSION = "0.2.19"
2
+ VERSION = "0.2.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardinal-ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Ellis