@@ -167,6 +167,80 @@ function deserializeTableElement(
167167 } ;
168168 } ) ;
169169
170+ if ( rows . length >= 2 ) {
171+ const headCells = ( rows [ 0 ] . cells ?? [ ] ) . map ( ( c ) => ( c || "" ) . trim ( ) ) ;
172+ const bodyRows = rows . slice ( 1 ) ;
173+ const firstHeader = ( headCells [ 0 ] ?? "" ) . toLowerCase ( ) ;
174+ const isTierTable =
175+ ( firstHeader === "tier" ||
176+ firstHeader === "tier rank" ||
177+ firstHeader === "rank" ) &&
178+ bodyRows . every ( ( r ) =>
179+ / ^ [ s a b c d ] ( \b | - | \s | $ ) / i. test ( ( ( r . cells ?? [ ] ) [ 0 ] ?? "" ) . trim ( ) ) ,
180+ ) ;
181+
182+ if ( isTierTable ) {
183+ const verdictIdx = headCells . findIndex ( ( h ) =>
184+ / v e r d i c t | w h y | s u m m a r y | n o t e s / i. test ( h ) ,
185+ ) ;
186+ const pricingIdx = headCells . findIndex ( ( h ) =>
187+ / p r i c e | p r i c i n g | c o s t | q u o t a / i. test ( h ) ,
188+ ) ;
189+
190+ const items = bodyRows . map ( ( row , rIdx ) => {
191+ const cells = ( row . cells ?? [ ] ) . map ( ( c ) => ( c || "" ) . trim ( ) ) ;
192+ const rawTier = ( cells [ 0 ] ?? "B" ) . toUpperCase ( ) . charAt ( 0 ) ;
193+ const tier =
194+ rawTier === "S" ||
195+ rawTier === "A" ||
196+ rawTier === "B" ||
197+ rawTier === "C" ||
198+ rawTier === "D"
199+ ? rawTier
200+ : "B" ;
201+ const name = cells [ 1 ] || `Platform ${ rIdx + 1 } ` ;
202+ const category = cells [ 2 ] || "" ;
203+ const summary =
204+ verdictIdx >= 3 && cells [ verdictIdx ]
205+ ? cells [ verdictIdx ]
206+ : cells [ 3 ] || "" ;
207+
208+ const details = [ ] ;
209+ for ( let cIdx = 3 ; cIdx < cells . length ; cIdx ++ ) {
210+ const val = cells [ cIdx ] ;
211+ if ( ! val || val === summary ) continue ;
212+ details . push ( {
213+ _type : "tierDetail" ,
214+ label : headCells [ cIdx ] || `Spec ${ cIdx - 2 } ` ,
215+ value : val ,
216+ } ) ;
217+ }
218+
219+ const badge =
220+ pricingIdx >= 2 && cells [ pricingIdx ] ? cells [ pricingIdx ] : undefined ;
221+
222+ return {
223+ _type : "tierItem" ,
224+ tier,
225+ name,
226+ ...( category ? { category } : { } ) ,
227+ ...( summary ? { summary } : { } ) ,
228+ ...( badge ? { badge } : { } ) ,
229+ details,
230+ } ;
231+ } ) ;
232+
233+ return block ( {
234+ _type : "tierList" ,
235+ title : `Alex's Architectural Tier List (${ items . length } Platforms Ranked)` ,
236+ subtitle :
237+ "Ranked from S-Tier (Purrfect Production Pick) to D-Tier based on security boundaries, memory architecture, and real-world DX." ,
238+ ajComment : "I ranked all of them! Watch out for shared VMs... 👀🐾" ,
239+ items,
240+ } ) ;
241+ }
242+ }
243+
170244 return block ( {
171245 _type : "table" ,
172246 rows,
0 commit comments