Hi Sam, > On Sep 23, 2017, at 1:14 AM, Sam Ruby <ru...@intertwingly.net> wrote: > > On Fri, Sep 22, 2017 at 11:24 PM, Craig Russell <apache....@gmail.com> wrote: >> >> The agenda roll call has two issues: >> >> 1. While taking roll call, there is traffic between client and server much >> more than is needed. The client receives multiple refreshes of the roll for >> each participant. It is difficult to tell why the screen is refreshing. It's >> strange that the entire roll refreshes several times. I'd like to review the >> code and perhaps simplify it so that each participant tick box generates a >> single message to the server and a single message back. Maybe I'm dreaming. > > Here's the relevant code: > > https://github.com/apache/whimsy/blob/master/www/board/agenda/views/pages/roll-call.js.rb > > Notes: > > 1) self.pending is set to true whenever a checkbox is clicked or focus > leaves an input field (i.e. the place where you note arrival and exit > times) and the text in that input field has changed. > > 2) Whenever the screen is updated (line 206), self.pending is checked, > and if true, a single messages is sent to the server which gets a > single response, and self.pending is reset. Note that JavaScript is > single threaded so this logic can't be interrupted; and that the > response (the do..end part of the post call) is processed > asynchronously.
When taking roll, if things go well, it takes about three seconds per "present" person. Less time for known attendees such as the chair and secretary. It takes more than three seconds for the server to respond. My theory is that when multiple responses are pending at the server side, they get out of order. This would be fine if each response simply refreshed the single attendee it was created from. But if the response refreshes all of the attendees, what we see is flashbacks in time. I cannot understand what is happening with the post 'minute', data do |minutes| block. If several responses are executing this code out of order while other Attendees are being clicked, are the results still predictable? I'd say that it's better for the Attendees to not talk to the server until roll call is complete, except for looking up names for non-agenda guests. I'd be happy if there is a (Roll Call Complete) button that sends the currently visible roll call to the server, and initializes the Vote list for the resolution section. We can discuss how to handle the (joined at... left at) comments as a separate issue. > >> 2. Once participants are added, there is no way to remove them. They >> continue to appear like zombies. Fixing this will require some design work. >> We might need to keep track of: >> >> participants who are in the agenda and not yet marked as present >> participants who are in the agenda and are marked as present >> non-participants who are in the agenda and were incorrectly marked as present >> participants who are not in the agenda and are marked as present >> non-participants who are not in the agenda and were incorrectly marked as >> present > > I believe that much if not all of that is already tracked. Here it > may help to start with the server view of the state: > > https://whimsy.apache.org/board/agenda/2017-09-20.yaml > > In the roll-call.js.rb code linked above, search for "add remaining > attendees". > >> In the attached screen shot, I made a few attempts to get David Fisher onto >> the agenda with sad results. > > One thing the current code supports is guests that are not committers. > To add a non-committer, type their name and click the checkbox. The > problem here is that once added, they can not be removed from display. > Note: this only affects the display: people who are not listed in the > agenda and do not attend do not appear in the draft minutes. > > A client side solution to this might be to NOT add an attendee to the > list of people if they are not present (note: people listed in the > agenda are added to separately). This could be as simple as changing > line 89 to > > people << person if person.present > > The server will still track such names, but they won't appear on the > roll call web page or in the draft minutes. > > If it is desired to remove name from what the server is tracking, that > code would go someplace in here: > > https://github.com/apache/whimsy/blob/master/www/board/agenda/views/actions/minute.json.rb#L32 > > Perhaps something like: > > attendance.delete_if do |name, records| > not records[:present] and not people.find {|id, person| person[:name] == > name} > end > > Perhaps around line 89? I'll have to take a bit more time to understand the walk-on code. Craig > >> Craig >> >> Craig L Russell >> Secretary, Apache Software Foundation >> c...@apache.org http://db.apache.org/jdo > > - Sam Ruby Craig L Russell Secretary, Apache Software Foundation c...@apache.org http://db.apache.org/jdo