+
    ]j"  c                     ^ RI Ht ^ RIt^ RIHu Ht ^ RIt^ RI	H
t
 ]P                  P                  ^ ]! ]
! ]4      P                  4       P                   ^,          4      4       ^ RIHtHtHt ^ RIHtHt ^ RIHtHtHtHt  ! R R4      tR R	R
/R R llltR]P>                  RRRR/R R llt R R lt!R R lt"R R lt#R R lt$R R lt%R R lt&R R lt'R# )!    )annotationsN)Path)Account
AccountRefAccountRegistryKind)AccountSnapshotHealthStatus)TrayMenuItemKindbuild_tray_modelformat_account_labelformat_limit_rowsc                  b    ] tR t^t]P
                  R3R R lltR R ltR R ltR R	 lt	R
t
R# )_FakeRegistryNc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )   accountslist[Account]default_slug
str | Nonekindr   locked_slugszset[str] | NonereturnNone )formats   "c/home/user/overdeck-private-tests/workstation-ai-indicator/modules/systray/tests/test_tray_model.py__annotate___FakeRegistry.__annotate__   s<     
5 
5
5 !
5 "	
5
 &
5 

5    c                	r    \        V4      V n        W n        W0n        \	        T;'       g    R4      V n        R # )Nr   )list	_accounts_default_slugr   set_locked_slugs)selfr   r   r   r   s   &&&&&r   __init___FakeRegistry.__init__   s/     h)	 !3!34r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r      s     $ $m $r   c                	,    \        V P                  4      # N)r    r!   r%   s   &r   r    _FakeRegistry.list   s    DNN##r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   "   s     " "j "r   c                	    V P                   # r*   )r"   r+   s   &r   r   _FakeRegistry.default_slug"   s    !!!r   c                    V ^8  d   QhRRRR/# )r   slugstrr   boolr   )r   s   "r   r   r   %   s     * *c *d *r   c                	    WP                   9   # r*   )r$   )r%   r1   s   &&r   	is_locked_FakeRegistry.is_locked%   s    ))))r   )r!   r"   r$   r   )__name__
__module____qualname____firstlineno__r   CODEXr&   r    r   r5   __static_attributes__r   r   r   r   r      s)    
 %8$=$=(,
5$"* *r   r   toolcodexc          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   r1   r2   aliasplanr   r=   r   r   r   )r   s   "r   r   r   )   s:      
 
  r   c          	     b    \        \        W04      V\        R 4      V ,          V  R2VRV  2R7      # )z/tmpz@example.comzacct-)refr@   account_homeemailrA   
account_id)r   r   r   )r1   r@   rA   r=   s   &&&$r   _accountrG   )   s>     t"&\D(l#4&> r   statusprimary_reset_atsecondary_reset_atc               (    V ^8  d   QhRRRRRRRR/# )r   used_primaryz
int | Noneused_secondaryrI   zfloat | NonerJ   r   )r   s   "r   r   r   :   s0      
 # %r   c               "    \        VV VVVR 7      # )rI   rJ   )r   )rL   rM   rH   rI   rJ   s   &&$$$r   	_snapshotrP   :   s      )- r   c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r   K   s     9/ 9/D 9/r   c            
     :   \        \        R R4      \        RRR4      .RR7      p R\        ^^"4      R\        \        P
                  RR4      /p\        W4      pVP                  pR	qCV8H  qU'       g   \        P                  ! RV3R W434      R
R\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;rTVP                    Uu. uF  qP"                  NK  	  p	p\$        P&                  \$        P&                  \$        P(                  \$        P*                  \$        P(                  \$        P,                  \$        P(                  \$        P*                  .qYV8H  q'       gy   \        P                  ! RV
3R!W34      R\        P                  ! V	4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;rVP.                  ^ ,          qP0                  p
RqV8H  qD'       g   \        P                  ! RV3R"V
V34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP.                  ^ ,          qP2                  p
RqVJ qD'       g   \        P                  ! R#V3R$W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP.                  ^,          qP0                  p
RqV8H  qD'       g   \        P                  ! RV3R"W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP.                  ^,          qP2                  p
RqVJ qD'       g   \        P                  ! R#V3R$W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP                   ^,          qP0                  p
RqV8H  qD'       g   \        P                  ! RV3R"W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP                   ^,          qP4                  p
RqV8H  qD'       g   \        P                  ! RV3R%W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP                   ^,          qP0                  p
RqV8H  qD'       g   \        P                  ! RV3R"W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMVP                   ^,          P6                   Uu. uF  qP"                  NK  	  p	p\$        P*                  \$        P(                  \$        P*                  \$        P*                  \$        P*                  \$        P*                  \$        P*                  \$        P*                  \$        P*                  \$        P*                  .
qYV8H  q'       gy   \        P                  ! RV
3R!W34      R\        P                  ! V	4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;rVP                   ^,          P6                   Uu. uF"  qP0                  '       g   K  VP0                  NK$  	  p	p. R&OqYV8H  q'       gy   \        P                  ! RV
3R!W34      R\        P                  ! V	4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;rVP                   ^,          qP0                  p
RqV8H  qD'       g   \        P                  ! RV3R"W34      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p	;p
;rMR# u upi u upi u upi )'rafaRafaroyRoypror   r   
codex:rafa	codex:royNzCodex: Roy (pro)py0modelpy2py5assert %(py7)spy7py1py4assert %(py6)spy6uW   🔓 Rafa · plus
5h [##################--] 88% left
7d [#############-------] 66% leftpy3assert %(py8)spy8Fu%   🔓 Roy · pro · ⚠ needs re-loginTzOpen dashboardopen_dashboardManage accountsQuit==z-%(py2)s
{%(py2)s = %(py0)s.title
} == %(py5)sz%(py1)s == %(py4)sz-%(py3)s
{%(py3)s = %(py1)s.label
} == %(py6)sisz.%(py3)s
{%(py3)s = %(py1)s.active
} is %(py6)s)z.%(py3)s
{%(py3)s = %(py1)s.action
} == %(py6)s)	u   Add account…z	Lock Rafau   Refresh login for Rafa…u   Rename Rafa…u   Remove Rafa…zLock Royu   Refresh login for Roy…u   Rename Roy…u   Remove Roy…)r   rG   rP   r   r   BROKENr
   title
@pytest_ar_call_reprcompare@py_builtinslocals_should_repr_global_name	_safereprAssertionError_format_explanation
menu_itemsr   r	   RADIO	SEPARATORACTIONSUBMENUaccount_itemslabelactiveactionchildren)registry	snapshotsr]   @py_assert1@py_assert4@py_assert3@py_format6@py_format8item@py_assert0@py_assert2@py_format5@py_format7@py_assert5@py_format9childs                   r   Btest_build_tray_model_renders_single_provider_title_and_menu_stater   K   s\   66*HUE5,IJH
 	iB'_\%8%8$EI
 X1E;;,,,,,,,,,;,,,,,,5,,,,5,,,;,,,,,,,,,,,,"'"2"23"2$II"2 	3""""  ""	8 	 	8 	 	 	 	3 	 	 	3 	 	 	 	8 	 	 	 	 	 	 	 q! '' 	-	-   	'	-  	!   	'   		-     	  
 q!1((1E1E11111(111!111(111E11111111q!R''R+RR+RRRRRR'RRR!RRR'RRR+RRRRRRRRRq!0((0D0D00000(000!000(000D00000000A8$$8(88(888888$888888$888(888888888A9%%9)99)999999%999999%999)999999999A9$$9(99(999999$999999$999(999999999$)$4$4Q$7$@$@A$@5JJ$@ A""F  F    A   A    F        &+%5%5a%8%A%AQ%AE[[KEKK%A 
Q 
V 
 
V 
 
 
 
Q 
 
 
Q 
 
 
 
V 
 
 
 
 
 
 
 A.$$.......$......$...........Y 4* B Rs   jjj.jc                   V ^8  d   QhRR/# rR   r   )r   s   "r   r   r      s     (1 (1 (1r   c                    \        \        R R4      \        RRR4      .R R7      p \        \        RRRR	7      \        R
RRRR	7      .R
\        P                  R7      pR\	        ^
^4      R\	        ^P^Z4      R\	        ^^4      R\	        ^7^A4      /p\        WV4      pVP                  pRqTV8H  qf'       g   \        P                  ! R'V3R(WE34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;reVP                  R,           U	u. uF  qP                   NK  	  p
p	RR.qjV8H  q'       gy   \        P                  ! R'V3R)W34      R\        P                  ! V
4      R\        P                  ! V4      /,          pRR V/,          p\        \        P                  ! V4      4      hR;p
;rVP                  ^ ,          P"                   Uu. uF  qP$                  NK  	  p
p\&        P(                  \&        P(                  \&        P*                  \&        P,                  .qjV8H  q'       gy   \        P                  ! R'V3R)W34      R\        P                  ! V
4      R\        P                  ! V4      /,          pRR V/,          p\        \        P                  ! V4      4      hR;p
;rVP                  ^ ,          P"                   Uu. uF"  qP                   '       g   K  VP                   NK$  	  p
p. R*OqjV8H  q'       gy   \        P                  ! R'V3R)W34      R\        P                  ! V
4      R\        P                  ! V4      /,          pRR V/,          p\        \        P                  ! V4      4      hR;p
;rVP                  ^,          P"                   Uu. uF  qP                   NK  	  p
pR!R".qjV8H  q'       gy   \        P                  ! R'V3R)W34      R\        P                  ! V
4      R\        P                  ! V4      /,          pRR V/,          p\        \        P                  ! V4      4      hR;p
;rVP.                  ^ ,          qP0                  pR#qVJ qU'       g   \        P                  ! R+V3R,W34      R\        P                  ! V
4      R$\        P                  ! V4      R \        P                  ! V4      /,          pR%R&V/,          p\        \        P                  ! V4      4      hR;p
;p;r_VP.                  ^,          qP0                  pR#qVJ qU'       g   \        P                  ! R+V3R,W34      R\        P                  ! V
4      R$\        P                  ! V4      R \        P                  ! V4      /,          pR%R&V/,          p\        \        P                  ! V4      4      hR;p
;p;r_R# u up	i u upi u upi u upi )-rT   rU   rV   rW   rX   rY   workWorkclauder=   personalPersonalmax)r   r   r   rZ   r[   zclaude:workzclaude:personalu,   Codex: Rafa (plus) · Claude: Personal (max)r\   r]   r^   r_   r`   ra   N:Nr   NCodexzClaude Coderb   rc   rd   re   uk   🔓 Work · plus · work@example.com
5h [#################---] 85% left
7d [###############-----] 75% leftur   🔓 Personal · max · personal@example.com
5h [#########-----------] 45% left
7d [#######-------------] 35% leftTrf   rg   rh   rl   rn   ro   )uW   🔓 Rafa · plus
5h [##################--] 90% left
7d [################----] 80% leftuU   🔓 Roy · pro
5h [####----------------] 20% left
7d [##------------------] 10% leftrj   rq   rs   )r   rG   r   CLAUDErP   r
   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r	   r   r   r   r   r   )codex_registryclaude_registryr   r]   r   r   r   r   r   r   r   r   r   r   r   r   r   s                    r   ?test_build_tray_model_renders_dual_provider_titles_and_submenusr      s   "66*HUE5,IJN $VV(3ZUB
   ''O 	iB'Yr2&yR(9R,	I ^HE;;HHHHHHHHH;HHHHHH5HHHH5HHH;HHHHHHHHHHHH#(#3#3B#78#74JJ#7T8Wm<TT<TTTTTT8TTT8TTT<TTTTTTTTT$)$4$4Q$7$@$@A$@5JJ$@ A""  	F  F   
 A  
 A  
  F     
   &+%5%5a%8%A%AQ%AE[[KEKK%A Q V  V    	Q   	Q   	 V      	 
 &+%5%5a%8%A%AB%AEKK%A Bw~G  G    B   B    G        q!0((0D0D00000(000!000(000D00000000q!0((0D0D00000(000!000(000D00000000# 9A R
 Cs   YYY'Y$Yc                   V ^8  d   QhRR/# rR   r   )r   s   "r   r   r      s      D r   c                    \        \        P                  ^
^RRR7      p Rp\        WR7      pRq2V8H  qD'       Eg3   \        P
                  ! RV3RW#34      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRRR\        P                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR	\        P                  ! V4      R
\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;rCR# )
      @TAg  ?TArO   nowr\   r   rb   snapshotrf   r_   rh   zassert %(py10)spy10N)z"5h [##################--] 90% leftz"7d [################----] 80% leftrl   )z=%(py5)s
{%(py5)s = %(py0)s(%(py1)s, now=%(py3)s)
} == %(py8)s)r   r   OKr   rv   rw   rx   ry   rz   r{   r|   r}   )r   r   r   @py_assert7@py_assert6r   @py_format11s          r   *test_format_limit_rows_hides_expired_resetr      sD   

(*H ,; X;  @  @    ;             X   X   ?   ;    @        r   c                   V ^8  d   QhRR/# rR   r   )r   s   "r   r   r      s       r   c                 z   \        \        P                  ^5^RRR7      p \        V 4      pRq!V8H  q3'       Eg   \        P
                  ! R V3R!W34      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRRR\        P                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR\        P                  ! V4      R\        P                  ! V4      /,          pR	R
V/,          p\        \        P                  ! V4      4      hR;p;r2RpRpRp\        WVR7      pRp\        WpVR7      qP                  q! 4       p. R"OqV8H  q'       Eg   \        P
                  ! R V3R#VV34      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRRR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRR\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V 4      '       d   \        P                  ! V 4      MRR\        P                  ! V4      R\        P                  ! V	4      R\        P                  ! V
4      R\        P                  ! V4      R\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;p;p;p;p;p	;p
;p;rR# )$5   g   1TA
checked_atr\   r   rb   r   rf   re   rg   rh   NzyncZyncr   r   r   r   r   rG   r_   ra   py9r   py12py14py16py18py21zassert %(py23)spy23)"5h [#########-----------] 47% left"7d [####----------------] 18% leftrl   )z0%(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py6)s)u    Zync · plus · zync@example.comr   r   )z%(py18)s
{%(py18)s = %(py16)s
{%(py16)s = %(py14)s
{%(py14)s = %(py0)s(%(py9)s
{%(py9)s = %(py1)s(%(py3)s, %(py5)s, tool=%(py7)s)
}, %(py10)s, now=%(py12)s)
}.splitlines
}()
} == %(py21)s)r   r   UNKNOWNr   rv   rw   rx   ry   rz   r{   r|   r}   rG   r   
splitlines)r   r   r   r   r   r   r   @py_assert8@py_assert11@py_assert13@py_assert15@py_assert17@py_assert20@py_assert19@py_format22@py_format24s                   r   ?test_cached_limits_stay_visible_while_a_refresh_is_inconclusiver      sU   b"H X&  +  +    &             X   X   &    +       
 &.h/?N/ j                           &.  /    19  19  ?N                      r   c                   V ^8  d   QhRR/# rR   r   )r   s   "r   r   r      s     F F Fr   c                    \        \        P                  ^5^RRR7      p \        \	        RRRR7      V RR7      P                  4       ^ ,          pRq!V8H  q3'       gz   \        P                  ! RV3RVV34      R	\        P                  ! V4      R
\        P                  ! V4      /,          pRRV/,          p\        \        P                  ! V4      4      hR;p;r2R# )r   r   r   r   r   r   r   r   u*   Zync · plus · zync@example.com · 7d oldrb   rc   rd   re   Ng   RArl   ro   )r   r   r   r   rG   r   rv   rw   r{   r|   r}   )r   r   r   r   r   r   s         r   7test_cached_limits_are_marked_with_their_age_once_staler      s    b"1LH  h/jl1 FEFEF F F4E4EF EF F<EIF  F F<EIFEF F F F F2E2EF F Fr   c                   V ^8  d   QhRR/# rR   r   )r   s   "r   r   r      s     S Sd Sr   c                 4   \         P                  p ^5p^Rp\        WV4      p\        V4      pRqTVJ qf'       Eg   \        P
                  ! RV3RWE34      RR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRRR\        P                  ! 4       9   g!   \        P                  ! \        4      '       d   \        P                  ! \        4      MRRR\        P                  ! 4       9   g!   \        P                  ! \         4      '       d   \        P                  ! \         4      MRR\        P                  ! V 4      R	\        P                  ! V4      R
\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V4      /	,          pRRV/,          p\        \        P                  ! V4      4      hR;p ;p;p;p;p;reR# )r   Nr\   r   rb   r   r^   r   rc   re   rh   r   r   py15zassert %(py17)spy17rq   )z%(py12)s
{%(py12)s = %(py0)s(%(py10)s
{%(py10)s = %(py1)s(%(py4)s
{%(py4)s = %(py2)s.BROKEN
}, %(py6)s, %(py8)s)
})
} is %(py15)s)r   rt   r   r   rv   rw   rx   ry   rz   r{   r|   r}   )	r   r   r   @py_assert9r   @py_assert14r   @py_format16@py_format18s	            r   $test_broken_account_hides_limit_rowsr      s   -9-@-@R"RbR_-@bIRIJRdRdRRRRRJRRRRRRRRRRRRRRRRR_RRRR_RRRRRRR\RRRR\RRR-@RRR"RRRbRRRIRRRJRRRdRRRRRRRRRr   c                   V ^8  d   QhRR/# rR   r   )r   s   "r   r   r      s     1 1D 1r   c            	     P   \        \        R R4      \        RR4      .R R 0R7      p \        V / 4      pVP                  pRq2V8H  qD'       g   \        P
                  ! RV3RW#34      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R	\        P                  ! V4      /,          pR
RV/,          p\        \        P                  ! V4      4      hR;p;rCVP                  ^ ,          qwP                  pRqV	J q3'       g   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;p;r9VP                  ^ ,          qwP                  pRqV	8H  q3'       g   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;p;r9VP                  ^ ,          qwP                   pRqV	J q3'       g   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;p;r9VP                  ^,          pVP"                  ^,          qwP                  pRqV	8H  q3'       g   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;p;r9VP"                  ^,          qwP                  pRqV	8H  q3'       g   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;p;r9VP"                  ^,          qwP                   pRqV	J q3'       g   \        P
                  ! RV3RW34      R\        P                  ! V4      R\        P                  ! V4      R\        P                  ! V	4      /,          p
RRV
/,          p\        \        P                  ! V4      4      hR;p;p;r9R# )ownerOwneragentAgent)r   r   r   u   🔒 Codex: Owner (plus)r\   r]   r^   r_   r`   ra   NTrb   rf   re   rg   rh   u   🔒 Owner · plusFzUnlock Owneru   Refresh login for Owner…rl   rn   rq   )z.%(py3)s
{%(py3)s = %(py1)s.locked
} is %(py6)srp   )z1%(py3)s
{%(py3)s = %(py1)s.sensitive
} is %(py6)s)r   rG   r
   ru   rv   rw   rx   ry   rz   r{   r|   r}   r   lockedr   r~   	sensitiver   )r   r]   r   r   r   r   r   r   r   r   r   r   manages                r   :test_locked_account_has_closed_icon_and_cannot_be_selectedr      sQ   7G,hw.HIYH Xr*E;;444444444;444444544445444;444444444444q!0((0D0D00000(000!000(000D00000000q!?''?+??+??????'???!???'???+?????????A1((1E1E11111(111111(111E11111111a F??15##5~5~55555#555555#555~55555555??1C##C'CC'CCCCCC#CCCCCC#CCC'CCCCCCCCC??10''050500000'000000'000500000000r   )plus)(
__future__r   builtinsrx   _pytest.assertion.rewrite	assertionrewriterv   syspathlibr   pathinsertr2   __file__resolveparentsaccount_registryr   r   r   health_clientr   r   
tray_modelr	   r
   r   r   r   rG   r   rP   r   r   r   r   r   r   r   r   r   r   <module>r      s    "   
  3tH~--/77:; < E E 7 * *.
  " ??	
 &* (,"9/x(1V$FS1r   