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