index_wr 'auction' refactoring
[brisk.git] / TODO.txt
1  TODO |
2 ------+
3
4   BUGS |
5  ------+
6    - /cont and /rules just during 'bidding' phase
7    DONE - Not sequence of 3 same chars
8    DONE   . check server side with test
9    DONE - Global vars checker
10    <release>
11    - usermgmt: add user delete
12    DONE - 10002 message when already clicked
13    DONE - trim spaces in apprentice form
14    DONE - Remove books from chat
15    DONE - usermgmt: add email
16
17
18   FEATURES |
19  ----------+
20    * multiple rules
21      DONE - show current rules
22      DONE - select tournment dropdown menu (send a 'cont' like message for each change)
23      - increase constraint for rules change
24      - strange 4 abandoned rule for auction
25      - check of max points
26      - check of suit at the end of bet
27      - new rules for 'together for fun' turnment
28      - cache data structure for tournments
29        . reload on SIGHUP
30      - select rules dropdown 'selected' to the current rule
31
32    WIP * inherited info
33    * Users Network construction
34      DONE - sql
35      DONE - dbase API
36      DONE - add apprentices tables
37      DONE - remove entry when set unknown
38      DONE - enhance info interface
39        DONE . SQL to show current evaluation
40        DONE . disable parts of interface
41        WIP . add title to items
42        . fix SELECT 
43      <release>
44      - minisplash at end of the match
45      - differentiate table authorization
46    * add new kind of isolation for apprentice
47
48    * Double click on chat to open preferences
49
50    * APPRENTICE
51      Phase2
52      DONE - match counters (part 2)
53        DONE . migration script for old users
54      - guarantee for apprentice
55
56
57
58 ---------
59    - APPRENTICE
60      Phase2
61      DONE - match counters (part 2)
62        DONE . migration script for old users
63
64    - APPRENTICE
65      Phase1
66      DONE - correggere minuta giornaliera
67      DONE - aggiungere mask per autogar
68      DONE - correggere email per apprentice
69      DONE - verificare la variabile per tout IP ban apprentice
70      DONE - chat ban for apprentice
71
72      DONE - ip check and time limit
73        DONE . sql
74          DONE . temporary table limitation
75        DONE . message
76      DONE - usermgmt extension
77      DONE - add close button
78      DONE - add apprentice icon
79      DONE - match counters (part 1)
80        DONE . sql for match counters
81      DONE - new info system
82        DONE - click management
83        DONE - show user info (RO)
84          DONE - require command/info
85          DONE - fix fiverank table
86          DONE - fix bug with bitwise
87          DONE - fix layout of tables
88      DONE - aggiungere books.png
89
90     - MENTORS
91      - listen all
92
93    - BUDDY LIST
94      - white list
95      - black list
96      - delegate
97
98    - DEANONYMIZER
99       . study how to move login delta injection
100
101    - CERTIFICATIONS
102       DONE . Guarantes for certified-only (buttons choice managed)
103       DONE . Tables for certified-only
104       . Term Of Use
105       . Placing for certified-only
106
107    - IP CLASSES BAN
108       DONE . BAN and BLACK lists added
109       DONE . update method to SIGHUP manager
110       DONE . create constructor refactored
111
112    - PLACEMENT-NORMALIZATION
113       DONE . Normalize previous points
114       DONE . Denormalize "Info" view
115       DONE . Denormalize explained matches
116       DONE . Check placement
117       DONE . Distinguish between inherited mult and local mult
118
119    - AUTO-MAINTENANCE
120      DONE . Terms Of Service acceptance
121        DONE . print date of hard switch
122        DONE . TOS version
123        DONE . user TOS acceptance (db field)
124        DONE . show TOS ([show me later, yes, no]/[yes, no])
125        DONE . switch-off date
126        DONE . manage accept
127        DONE . manage refuse
128        DONE . show current TOS
129        DONE . disable user reason integer field and remove SUSPEND state (db, php)
130        DONE . fix tos layout
131        DONE . opt - download TOS
132        . opt - checkbox for anonimous users with message when not checked
133        . opt - button enabled when arrived to the bottom of the TOS only
134        . opt - check TOS version between config file and TOS file
135      DONE . show guarantee (/guar <login> command)
136        DONE . multi-language
137        DONE . command documentation
138        DONE . manage disagreeding users investigation
139        DONE . self guaranteed
140      . DONE New Users Guarantee Procedure
141        . DONE Change guarantee workflow
142        . DONE Db update
143
144          UserA                 UserB                      Admin
145 -------------------------------------------------------------------------
146       guarante UserB
147            |
148            v
149       Save on mail
150          table,
151       email to UserB
152     (Disabled, MAILED)
153 -------------------------------------------------------------------------
154                            Receive email
155                            to check address
156                                  |
157                                  v
158                            Click on link
159                                  |
160                                  v
161                            Check on mail
162                                table,
163                            update user status,
164                            delete mail rec
165                           (Disabled, TOBECHK)
166 -------------------------------------------------------------------------
167                                                        admin panel
168                                                        accept user
169                                                             |
170                                                             v
171                                                      send email with
172                                                      password,
173                                                      update user status
174                                                       (Normal, NONE)
175 -------------------------------------------------------------------------
176                            Receive email
177                            with password
178 -------------------------------------------------------------------------
179
180      DONE . More user info in the list
181      DONE . Manage date to display when a user was required
182      . Email-address expiration check
183      . Account expiration
184
185
186    DONE - CONTINUE FEATURE
187      DONE . replace explicit strings with multilanguage array
188      DONE . add a php downloader with filtering on allowed requests
189      DONE . save points every game
190      DONE . modify points calculation to include order and mazzo
191      DONE . exclude not standard types from statistics
192          DONE . daily reports (1 for each active tournament)
193          DONE . monthly stats (for normal match only)
194      DONE . show current match ID when created
195      DONE . add info about continue to the info page
196      DONE . add command to continue
197          DONE . check consistency of the request
198      DONE . rearrange users and game status to continue the selected match
199      DONE . investigate user reordering ??
200
201    - WEBSOCKET TRANSPORT
202      . refactoring $enc attribute management
203      DONE . reintroduced $enc = 'plain' for websocket
204      DONE . fallback for not correct WS version
205      DONE . fini of ws stream
206      DONE . reactivate compression
207      DONE . fix xynt_test01
208      DONE M2: brisk working
209      DONE . manage multiport apache config
210      DONE . manage headers correctly in sac-a-push
211      DONE . manage transport.close method where required
212      DONE . xynt_stream: manage fallback to multiple ports
213      DONE . manage fini for ws
214      POST . server: manage input data from clients
215      POST . manage ping/pong (seems not required)
216
217      DONE . client (xynt_streaming.js)
218      DONE . server (transport.phh)
219
220      DONE M1: xynt_test01.php working
221
222
223    - improved S
224      . db update (add components, maybe single string)
225      . filter in index.php
226      . filter in index_wr.php
227
228    - prefs API:
229      . prefs_assign(content): assign json content as output var
230      . prefs_apply(prefs_new): apply new content to g_prefs and system
231      . prefs_load(content): load json content and apply to g_prefs and system
232
233      . prefs_update: update preferences temporarly
234      . prefs_save: save to the server the new prefs
235
236    - preferences (listen into preferences)
237         // js var, volatile server, (db server || cookie)
238         temporary: js var, volatile server
239         permanent: js var, volatile server, (db server || cookie)
240
241      . data from db OR, if missing, from cookies
242
243      . update values
244      . database change
245      . MANAGE NOT AUTH USERS
246
247    - preferences (with "modifiable S")
248      . Mod. S: new flag into database
249      . graph infrastructure
250      . new box to edit color
251
252   MAJOR |
253  -------+
254    - BUG: some connection to the named socket fails
255    - Not simultaneous more then one stream
256
257
258   MINOR |
259  -------+
260    WIP - try to be more antivirus-friendly
261    - multiple rows between games
262    - packetize and automatize php-ancillary and apache module
263    - DISABLED_TO_FIX: DNS access (perform blocking dns requests, must be fixed)
264
265
266   DONE |
267  ------+
268    DONE - temporarly server hung not reflected on user timeouts
269    DONE - timeouted users are still be able to sit down (only the first at the table is banned)
270    DONE - page still opened after the server restart
271    DONE - log_legal address fix
272    DONE - manage too fast reload in xynt-streaming
273    DONE - add xhr as transport layer and manage different streams better
274    TEST - BUG: pari + 72 non fa 4x ma attualmente fa 3x, da correggere
275    TEST - BUG: lurker are logged out (and remain a pending socket opened (look the spush log)
276    DONE - save/restore database
277    DONE - into the room local step remains -1
278    DONE - centralize all '<script ...' incapsulation to allow multiple transport system.
279    DONE - BUG: access with password from 2 diff browsers the second go in strange "page not found" 
280           in the first tentative, the second works
281    DONE - BUG: access with password from 2 diff browsers place the first in a strict loop (the 
282           problem was a call to a static parent method instead of the overrided child method,
283           substitute self:: with the dynamically get class::)
284    DONE - garbage management
285
286    DONE/FROZEN - problem with getpeer (HOSTADDR)
287
288    DONE - slow cards distribution
289    DONE - substr to mb_substr
290    DONE - parametrizations:
291           . parametrization of $DOCUMENT_ROOT  var in brisk-spush.phh file
292           . parametrization of SITE_PREFIX(_LEN) define
293           . move the name of the named socket into the configuration file
294    DONE - manage and test cross forwarder between table and room
295    DONE - setcookie (for tables only and persist prefs)
296    DONE - images flickering on slow windows: try to poll stream every 300 ms (seems to be download problem)
297    DONE - database connection fails after a while, check close and try PGSQL_CONNECT_FORCE_NEW.
298    DONE - unneeded garbage_time.expired access
299    DONE - BUG: fast loop on stream index_rd_ifra page (js watchdog start without timeout corrupt counts)
300    DONE - BUG: logout failed (fixed with a garbage_collector wrapper at sac-a-push level
301    DONE - 404 wrong page management (remove directories redirections (es. brisk/))
302    DONE - configuration file management
303    DONE - app level keep-alive
304    DONE - index_wr other issues
305    DONE - from room to table
306    DONE - from table to room
307    DONE - chunked
308    DONE - bug: read from a not resource handle (already closed because a new socket substitute it)
309    DONE - partial write for normal page management
310    DONE - index_rd_ifra: last_clean issue
311    DONE - fwrite failed error management (select, buffer where store unsent data, and fwrite check and retry)
312    DONE - bug: after restart index_rd.php receive from prev clients a lot of req
313    DONE - index_wr.php::chat
314    DONE - index_wr.php::exit
315    DONE - index_rd.php porting
316    DONE - generic var management from internet
317    DONE - index.php auth part
318    ABRT - index_wr.php::reload - reload is js-only function
319    ABRT - keepalive management - not interesting for our purposes
320
321  BRISK4 (mammuth)
322  ======
323
324  - STEP MANAGEMENT VERIFY
325  Slim Paragraph
326  DONE - move the garbage timeout on file
327  DONE - in index_rd load all data only when required
328  - briskin5 alignment
329    DONE . extern del garb_timeout
330    DONE . user_load parameters verify
331    DONE . Bin5::load_data and Bin5::save_data refactoring with
332           data split
333    . move many function into "Bin5 class"
334  - garbaging of .step files
335
336  DB: - initial usage
337      DONE - configurabilitĂ  file o db
338      DONE - aggiornare le funz di gestione db in modo che prevedano anche il flag DISABLE
339      DONE - travasatore file to pg
340        DONE - travaso punteggi
341        DONE - memorizzazione nuovi i punteggi nel db
342        DONE - gestione classifiche in SQL
343          DONE - produrle
344          DONE - mostrarle
345
346      STEP 1.1
347        DONE - points archiver
348
349      STEP 1.2
350        DONE - partial usability if database go down.
351
352      STEP 1.5
353      - sistema di inserimento nuovi utenti (riversatore da form di inserimento)
354
355      STEP 2
356      - modifica password   
357      - ripristino password 
358
359      STEP 3
360      - comunicazioni di aggiornamento (stato salvato sul server) 
361
362  DONE - var $G_base aggiunta per gestire include in include da path differenti
363
364  BRISK3 (trusty)
365  ======
366   DONE - donameter
367     DONE - G_donors
368     DONE (WOW!) - js object with infos
369     DONE - main logic at login (cookie check in index_rd.php; show_message and createCookie via snippets with block
370            to prevent fast reload)
371     DONE - cookie per non assillare e visualizz.
372     DONE - graphical donameter
373     WIP content (in conf.)
374
375   DONE - numero di tavoli auth-only nel .brisk-install
376   - isolation
377     TEST - ricalcolo delle persone in piedi quando si cambia modalitĂ 
378     DONE - se si e' in isolation non si può cambiare nick perdendo l' auth
379     DONE - non leggere le chat di quelli non autenticati (in isolation)
380     DONE - regole per passare alla modalita' (in piedi o ai tavoli autenticati) 
381     DONE - treni non auth da nascondere 
382     DONE - verso gli altri ??: uguale a prima
383
384   finire multilingua (briskin5/index_wr.php e altri se ce ne sono)
385   coniglio
386   only auth strictly
387   placing limits to config file
388
389 Dunque, 
390
391 - come vengono aggiornate le classifiche: ogni giorno alle 23:58
392
393 - cosa cambia tra le tre coppie di classifiche: 
394   ci sono le classifiche dell' ultima settimana, quelle dell' ultimo mese,  e quelle dell' ultimo trimestre,
395   per ognuno di questi lassi di tempo poi c'è la classifica di chi ha giocato piĂą di TOT partite o meno di TOT partite, con TOT che cambia a seconda del lasso di tempo.
396
397 - come vengono calcolate le classifiche: per ogni utente vengono presi tutti i punti fatti ai tavoli con lucchetto nel lasso di tempo preso in considerazione (ultima settimana, ultimo mese o ultimo trimestre), sommati e divisi per il numero di partite fatte in quello stesso lasso di tempo per normalizzare i valori; poi siccome la gente quando vede 0.18734 sbarella ho deciso di moltiplicare il tutto per 100.
398
399 Un esempio per chiarire:
400
401   l'utente 'pippo' che Ă¨ nuovo gioca 4 partite nell'ultima settimana con i seguenti punteggi:
402     -2, 1, 2, 1
403   lo score viene { [ (-2) + (1) + (2) + (1) ] / 4 }  * 100 = 50.0
404   
405   a paritĂ  di score tra utenti va piĂą in alto chi ha giocato piĂą partite.
406
407 Se dopo quelle 4 partite 'pippo' non ne giocherĂ  piĂą, passata una settimana dall'ultima giocata 
408 sparirĂ  dalla classifica settimanale e rimarrĂ  in quelle mensili e trimestrali.
409
410
411   
412
413
414
415
416  BUG
417  ---
418  
419   DONE - paste da demauroparavia
420   DONE - recupero partita per re-login con password
421   DONE - problema "|" nei nomi (manca enhance degli script lato server)
422   - problema col treno se mouse sopra mentre stringe (verif)
423   
424  MINOR
425  -----
426
427  NORMAL
428  ------
429
430   - win test
431   WIP - /listen 
432     DONE - skin della textarea
433     DONE - set cookie 
434     DONE - init client (read from cookie) - ALWAYS BY SERVER
435     DONE - init server
436     DONE - after cookie check auth-only when no-auth case
437     DONE - aggiungi info accanto a "Chat"
438   DONE - /mesgtoadm
439   DONE - img dei comandi
440
441   DONE - form per garantire utenti (accoda in un file nel formato corretto)
442   DONE -   process request
443   DONE -   show form
444   DONE -   close butt
445   DONE -   submit form
446   DONE -   process form js side 
447   DONE -   process form
448   DONE -   documentazione in help
449
450   DONE - user status
451
452   DONE - aggiornare help
453   DONE -   overflow management
454   DONE -   for status
455   -   for password
456
457   DONE - reload home
458   - notify for long pages
459
460   - buddy list
461   - silenziastolti vari (fino al buddy import)
462   - restrict challenge per IP
463   - restricted charset for login
464   - watchdog
465
466   - db (minimal)
467     - db admin page
468     - user db admin
469     - use db 
470     - admin db
471
472     - studiare un anti-dos
473   - login modify
474  DONE  - db (fake)
475  DONE  - display auth
476     - manage preferences 
477
478  minor
479  -----
480    - auth after login
481
482 ----- done ------
483
484  BUG
485  ---
486   DONE   righe troncate
487   DONE - questione "a monte" che:
488   DONE   - lascia fuori il bottone
489   DONE   - scrive &agrave e compagnia
490   DONE - refresh act_table when unauthorized
491   DONE - problema ghost autenticato (ne prendi il posto ovunque sia)
492
493  MINOR
494  -----
495   DONE - refactoring of the owner name (auth attr for owner name)
496   DONE   - room
497   DONE     - at chat input line 
498   DONE     - in the chat output line
499   DONE     - deauth management
500   DONE - table
501   DONE   - at chat input line
502   DONE   - in the chat output line
503   DONE   - for user area of other users
504   DONE   - deauth management
505   DONE - alart to one user
506
507
508  NORMAL
509  ------
510   DONE - strong ban: "expire time|IP|session|(nick if authenticated)"
511   DONE   - login: se auth      -  verifica solo gli expire per quel nick
512   DONE   -        se non auth  -  verifica gli expire per IP e sessione
513   DONE   - riscrivere messaggi
514
515   DONE - login 
516   DONE   - se pass:
517   DONE     - richiede per l' utente un token (tutta la parte backend va un minimo studiata)
518   DONE     - lo legge, ci hasha la password
519   DONE     - invia la pass al server hashata
520   DONE   - se non pass:
521   DONE     - check del login e return corretto
522   DONE     - oggetto in shm single table con ( "ip", "login", timestamp ) e suo management
523   DONE     - rename ghost if logged
524   DONE     - onunload_cb e onbeforeunload_cb !!! 
525   DONE   - da change attrs a change class (input field)
526   DONE     - colore del bg per arrivare ad essere omogeneo
527   DONE     - cambiare path e file di config
528   DONE   - login with or without pass
529   DONE   - registered nick notice (METTERE IL MSG NELLA PAG DI LOGIN)
530   DONE     - segnalare tavoli solo per auth
531   DONE     - rename restriction at auth table
532   DONE     - change nick (strcasecmp)
533   DONE   - refact js tables to handle flags
534   DONE - room javascript refactoring
535
536   DONE - work background
537   DONE - reserved tables
538
539
540  BRISK2 (spawn)
541  ======
542
543    
544    URGENT - tables spawn
545             DONE - link with photos
546             DONE - top banner in Etc file
547             DONE - spawn of a table
548             DONE - data to cookies (removed table_idx from xhr calls also)
549             DONE - set subst to shutdowner/shutdowned
550             DONE - return to index.php
551             DONE - game's token
552             DONE - recover of corrupted table data
553             DONE - closure of a table
554             DONE - flush of the table
555             DONE - security checks for right scope access
556             DONE - garbage collector management
557             DONE -    recursive garbage - howto ?
558             DONE - stat & subst in browser
559             DONE - laccwr setting and exit if all players are unactive for some time
560             DONE - the list of test case
561             DONE - shm dimension
562             DONE - remove unused parts
563             DONE - move images
564             DONE - optimizations
565             DONE - cambiare titolo al tavolo
566             DONE - shutdowning lock tables
567             DONE - topbanner
568             DONE - public announcements
569             DONE - 10 sec to exit from table
570
571             FAR - inheritances
572    
573    TRAIN  -  DONE - add again in reload   
574              DONE - wag_set refact
575              DONE - filtra char speciali per title
576              DONE - chatt_send refact 
577              DONE - elenco dei giocatori
578              DONE - documentazione online
579              DONE - timeout management     
580              LATER - border color a muzzo
581        
582    NORM   - testament
583    NORM   - public announcements
584    NORM   - 10 sec to exit from table
585    NORM   - moving label for tables click
586
587 ----------------- join -----------------
588    NORM   - map
589
590    NORM   - restart preload img
591    NORM   - tools dir with a main and some pages where check briscola tools.
592    NORM   - watchdog
593
594    NORM   - chat vecchie in reload (forse)
595
596  MIDDLE TODO
597  ===========
598
599    - user assistant (with button to enable disable)
600    - documentation
601
602
603  FAR TODO
604  ========
605    NORM - internationalization
606    NORM - img -> div + css
607    
608  WEB
609  ===
610
611    - link to stable/unstable
612
613 -------------------------------------------------------------------
614  DONE
615  ====
616
617    ABORTED - asta: highlight buttons (css hover) - change pointer when over
618    DONE - step proxy
619    DONE - special chars in js
620    DONE - ban temporaneo dai tavoli
621    DONE - flash player to play sound
622    DONEBUG - (aum. il timeout) - carte giocate che restano girate
623          Sembra non migliorare di molto la cosa, gestita la cache
624          correttamente, sono apposto.
625
626    DONE - one player reject a game, to less points (<= 2)
627    DONE - help page
628    DONE - test di download per la cache
629    DONE - se passano tutti tranne l'ultimo l'asta va al penultimo.
630           Corretto il codice, occorre verificare se questo
631           ingenera qualche problema.
632    DONE - raddoppiato il numero di righe nella chat
633    DONE - corretto bug del /nick
634    DONE - carosello pubblicitĂ  altout
635    DONE - smammamorti
636    DONE - unload of the stream
637    DONE - standup centrati
638    DONE - current player - in info
639    DONE - HELP butt con ABOUT, REGOLE, VERSIONE
640    DONE - welcome lines in the chats (room and table)
641    DONE - welcome lines in the chats (room and table)
642    DONE - nomi in primo piano se vai sul quadrato   
643    DONE - to pass explicit config file to INSTALL.sh
644    DONE - flag to create a config file
645    ABRT - bottoni => immagini
646    DONE - aggiungere bottone al login
647    DONE - nomi in primo piano se vai sul quadrato   
648    DONE - installer to set cookie path
649    DONE - change name
650    DONE - automatic and manual logout
651    DONE - cache problems solved via .htaccess
652    DONE - all players out of the auction
653    DONE - time to send cards
654    DONE - hide cards before sends at a new game
655    DONE - well recognization of the browser and O.S.
656    DONE - login consistency !!!!
657    DONE - functionalization of garbage
658    DONE - call garbage function into login
659    DONE - game
660    DONE - manage the reload from scratch of the table page
661    DONE - table reset
662    DONE - sendcard => card_send(idx, ....)
663    DONE - show table for game
664    DONE - points calculation
665    DONE - make-up of the chooser
666    DONE - where place the briscola on the table
667    DONE - users info
668    DONE - show current auction position
669    DONE - table with internal management of the transition between pages.
670    DONE - server side page abort management  
671    DONE - cookie problem with Ajax
672    DONE - spostare il tasto "esco"
673    DONE - to pass explicit config file to INSTALL.sh 
674    DONE - 8 tables
675    DONE - safety out management
676    DONE - info enhancement and related button (how win the last game and
677           with how much points ?)
678
679  WEB
680    DONE - homepage
681    DONE - screenshots
682
683 DOC
684    CHAPTERS
685       HTTP Streaming
686       Local serializer
687       Database on shmem
688       Page abort (reload on http streaming case)
689       Chat
690       Cookies management
691       CSS tricks
692
693 CHECK ON NEW SERVERS
694 .htaccess AllowOverwrite mode for Cache-Control directive
695
696
697
698
699 */
700