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