a code review tool

style(tui): add padding to review view for visual consistency

+15 -8
+15 -8
lib/tui/code_review_view.ml
··· 231 231 List.nth file_paths selected_file_idx 232 232 in 233 233 (* Diff pane sub-component *) 234 + let pad_w = 2 in 235 + let pad_h = 1 in 236 + let footer_height = 1 in 234 237 let diff_dims = 235 238 let%arr dimensions in 236 - let left_pane_width = Int.max 20 (dimensions.width * 25 / 100) in 239 + let content_width = dimensions.width - (2 * pad_w) in 240 + let left_pane_width = Int.max 20 (content_width * 25 / 100) in 237 241 let separator_width = 1 in 238 - { Dimensions.width = dimensions.width - left_pane_width - separator_width 239 - ; height = dimensions.height - 1 242 + { Dimensions.width = content_width - left_pane_width - separator_width 243 + ; height = dimensions.height - pad_h - footer_height - pad_h 240 244 } 241 245 in 242 246 let diff_scroll_view, diff_inject = ··· 324 328 and file_paths 325 329 and flavor = Catppuccin.flavor graph in 326 330 let c color = Catppuccin.color ~flavor color in 327 - let left_pane_width = Int.max 20 (dimensions.width * 25 / 100) in 331 + let content_width = dimensions.width - (2 * pad_w) in 332 + let left_pane_width = Int.max 20 (content_width * 25 / 100) in 333 + let content_height = dimensions.height - pad_h - footer_height - pad_h in 328 334 let file_list = 329 335 render_file_list 330 336 ~flavor ··· 333 339 ~reviewed_files 334 340 file_paths 335 341 in 336 - let separator_height = dimensions.height - 1 in 337 342 let separator = 338 343 View.vcat 339 - (List.init separator_height ~f:(fun _ -> 344 + (List.init content_height ~f:(fun _ -> 340 345 View.text ~attrs:[ Attr.fg (c Overlay0) ] "\xe2\x94\x82")) 341 346 in 342 347 let footer = ··· 353 358 ~height:dimensions.height 354 359 () 355 360 in 356 - let pinned_footer = View.pad ~t:(dimensions.height - 1) footer in 357 - let base_view = View.zcat [ pinned_footer; main_content; bg ] in 361 + let pinned_footer = View.pad ~l:pad_w ~t:(dimensions.height - 1 - pad_h) footer in 362 + let base_view = 363 + View.zcat [ pinned_footer; View.pad ~l:pad_w ~t:pad_h main_content; bg ] 364 + in 358 365 if showing_approval_prompt 359 366 then ( 360 367 let overlay = render_approval_prompt ~flavor ~dimensions in