aboutsummaryrefslogtreecommitdiff
path: root/.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml
diff options
context:
space:
mode:
authorMichael Gattozzi <mgattozzi@gmail.com>2020-01-05 23:19:42 -0500
committerMichael Gattozzi <mgattozzi@gmail.com>2020-01-05 23:19:42 -0500
commit7dfa1b8dc9fb6d1fef974e7c29a32bff3146c71d (patch)
treedfa9ea68e30ca43cb99a1043ff37315e7a21eb85 /.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml
parent03238ddf40330db173b00439139e6e74958b7eb1 (diff)
Fix the ticket tui so it does not panic
The tui for ticket uses indexing in order to have quicker unchecked access into data structures for the data needed that gets displayed in the tui. However, you can't index empty data. We add a check for this in places that expect data to exist so that nothing will cause a panic. We also add fixes to handle the fact that you can't divide by zero in our index modifying logic when pressing the left/right/up/down arrow keys. With this the tui shouldn't panic anymore and can work in an empty state. Closes: 4c37e800-2e38-11ea-b6e0-32f54a3ad7cd 'Having no tickets causes the TUI to crash'
Diffstat (limited to '.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml')
-rw-r--r--.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml17
1 files changed, 17 insertions, 0 deletions
diff --git a/.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml b/.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml
new file mode 100644
index 0000000..960ee5d
--- /dev/null
+++ b/.dev-suite/ticket/closed/having-no-tickets-causes-the-tui-to-crash.toml
@@ -0,0 +1,17 @@
+title = 'Having no tickets causes the TUI to crash'
+status = 'Closed'
+id = '4c37e800-2e38-11ea-b6e0-32f54a3ad7cd'
+assignees = [[
+ '64c00ccc-761e-4484-86ac-904e461bb300',
+ 'Michael Gattozzi',
+]]
+description = '''
+Due to how the ticket tui uses indexing to avoid bounds checks this causes an
+issue when you're, well, out of bounds. This was handled properly for when we
+have n > 0 elements in the open or closed ticket arrays. An empty state for
+when there are no tickets and a check for an empty collection need to be
+created so that the indexing will be avoided and cause a crash.
+'''
+version = 'V1'
+
+[comments]