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