Pagination issue #94

Open
opened 2025-07-04 13:18:00 +02:00 by Alfred-mk · 1 comment
Member

The cmd/main.go binary supports pagination and navigation till the final page, and moving back

However, the cmd/africastalking/main.go has a glitch in which one cannot navigate past the second page

Currently analyzing the logs to see the differences

The cmd/main.go binary supports pagination and navigation till the final page, and moving back However, the cmd/africastalking/main.go has a glitch in which one cannot navigate past the second page Currently analyzing the logs to see the differences
Alfred-mk added the
Kind/Bug
Status
Need More Info
Priority
High
ussd/user-reported
labels 2025-07-04 13:18:00 +02:00
kamikazechaser added this to the USSD project 2025-07-14 14:56:57 +02:00
Author
Member

Noted differences:
1.
In cmd/main.go

[T] render:size.go:100 check values     k=view_voucher, v=, idx=1, cursors=[0 91 162 237 313 388]
[T] render:size.go:100 check values     k=get_vouchers, v=1: FSPTST 7.082: MEKO 10000.003: FATIN 1.894: NEMA 17.415: MNAZI 0.016: CALIFO 250.71

In africastalking, we only have

[T] render:size.go:100 check values     k=get_vouchers, v=1: FSPTST 7.082: MEKO 10000.003: FATIN 1.894: NEMA 17.415: MNAZI 0.016: CALIFO 250.71
  1. cmd/main.go starts the render for index 1, while africastalking starts at 0

cmd/main.go

[D] render:page.go:175 render for       index=1
[D] render:page.go:391 rendered template        bytes=114
[D] render:menu.go:261 applypage        m=pagecount: 6 menusink: false next: true prev: true, idx=1

Africastalking

[D] render:page.go:175 render for       index=0
[D] render:page.go:391 rendered template        bytes=134
[D] render:menu.go:261 applypage        m=pagecount: 6 menusink: false next: true prev: false, idx=0
  1. Africastalking remains stuck on page index 1 instead of moving to the next pages with the next input. This ends up rendering up to the second page, and one cannot move to the previous page.
[I] vm:runner.go:404 input match        input=3838, next=>
[D] state:state.go:231 next page        location=select_voucher, index=1


[I] vm:runner.go:404 input match        input=3838, next=>
[D] state:state.go:231 next page        location=select_voucher, index=1

cmd/main.go takes the next input and moves to the next page

[I] vm:runner.go:404 input match        input=3838, next=>
[D] state:state.go:231 next page        location=select_voucher, index=2

[I] vm:runner.go:404 input match        input=3838, next=>
[D] state:state.go:231 next page        location=select_voucher, index=3

[I] vm:runner.go:404 input match        input=3838, next=>
[D] state:state.go:231 next page        location=select_voucher, index=4
Noted differences: 1. In cmd/main.go ``` [T] render:size.go:100 check values k=view_voucher, v=, idx=1, cursors=[0 91 162 237 313 388] [T] render:size.go:100 check values k=get_vouchers, v=1: FSPTST 7.082: MEKO 10000.003: FATIN 1.894: NEMA 17.415: MNAZI 0.016: CALIFO 250.71 ``` In africastalking, we only have ``` [T] render:size.go:100 check values k=get_vouchers, v=1: FSPTST 7.082: MEKO 10000.003: FATIN 1.894: NEMA 17.415: MNAZI 0.016: CALIFO 250.71 ``` 2. cmd/main.go starts the render for index 1, while africastalking starts at 0 cmd/main.go ``` [D] render:page.go:175 render for index=1 [D] render:page.go:391 rendered template bytes=114 [D] render:menu.go:261 applypage m=pagecount: 6 menusink: false next: true prev: true, idx=1 ``` Africastalking ``` [D] render:page.go:175 render for index=0 [D] render:page.go:391 rendered template bytes=134 [D] render:menu.go:261 applypage m=pagecount: 6 menusink: false next: true prev: false, idx=0 ``` 3. Africastalking remains stuck on page index 1 instead of moving to the next pages with the next input. This ends up rendering up to the second page, and one cannot move to the previous page. ``` [I] vm:runner.go:404 input match input=3838, next=> [D] state:state.go:231 next page location=select_voucher, index=1 [I] vm:runner.go:404 input match input=3838, next=> [D] state:state.go:231 next page location=select_voucher, index=1 ``` cmd/main.go takes the next input and moves to the next page ``` [I] vm:runner.go:404 input match input=3838, next=> [D] state:state.go:231 next page location=select_voucher, index=2 [I] vm:runner.go:404 input match input=3838, next=> [D] state:state.go:231 next page location=select_voucher, index=3 [I] vm:runner.go:404 input match input=3838, next=> [D] state:state.go:231 next page location=select_voucher, index=4 ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: grassrootseconomics/sarafu-vise#94
No description provided.